From 299454d5dfddd66f7828e2b7219755128d272f34 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Tue, 8 Mar 2022 05:25:46 +0100 Subject: [PATCH] IDEMPIERE-5223 Allow attachment preview for xml and json (#1231) --- org.adempiere.base/src/org/compiere/util/MimeType.java | 1 + .../WEB-INF/src/org/adempiere/webui/panel/WAttachment.java | 2 ++ 2 files changed, 3 insertions(+) diff --git a/org.adempiere.base/src/org/compiere/util/MimeType.java b/org.adempiere.base/src/org/compiere/util/MimeType.java index 0f521fce30..fd7867a987 100644 --- a/org.adempiere.base/src/org/compiere/util/MimeType.java +++ b/org.adempiere.base/src/org/compiere/util/MimeType.java @@ -357,6 +357,7 @@ public class MimeType // { ".jpg", "image/pjpeg"}, { ".jps", "image/x-jps"}, { ".js", "application/x-javascript"}, + { ".json", "application/json"}, { ".jut", "image/jutvision"}, { ".kar", "audio/midi"}, diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WAttachment.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WAttachment.java index cdfcf3fcc7..98883f6d03 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WAttachment.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WAttachment.java @@ -146,6 +146,8 @@ public class WAttachment extends Window implements EventListener autoPreviewList.add("image/gif"); autoPreviewList.add("text/plain"); autoPreviewList.add("application/pdf"); + autoPreviewList.add("text/xml"); + autoPreviewList.add("application/json"); // autoPreviewList.add("text/html"); IDEMPIERE-3980 }