|
|
|
@ -58,8 +58,8 @@ public class UploadServlet extends HttpServlet {
|
|
|
|
|
|
|
|
|
|
protected GCUBELog logger = new GCUBELog(UploadServlet.class);
|
|
|
|
|
|
|
|
|
|
public static final String D4ST = Extensions.REPORT_TEMPLATE.getValue(); //extension of record type
|
|
|
|
|
public static final String D4SR = Extensions.REPORT.getValue(); //extension of template type
|
|
|
|
|
public static final String D4ST = Extensions.REPORT_TEMPLATE.getValue(); //extension of Report Template type
|
|
|
|
|
public static final String D4SR = Extensions.REPORT.getValue(); //extension of Report type
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
@ -197,7 +197,9 @@ public class UploadServlet extends HttpServlet {
|
|
|
|
|
// System.out.println("extension.compareToIgnoreCase(D4ST) "+extension.compareToIgnoreCase(D4ST));
|
|
|
|
|
// System.out.println("extension.compareToIgnoreCase(D4SR) "+extension.compareToIgnoreCase(D4SR));
|
|
|
|
|
|
|
|
|
|
if(MimeTypeUtil.isZipContentType(contentType) && (extension.compareToIgnoreCase(D4ST)==0)){ //Create REPORT TEMPLATE
|
|
|
|
|
boolean isZipFile = MimeTypeUtil.isZipContentType(contentType);
|
|
|
|
|
|
|
|
|
|
if(isZipFile && (extension.compareToIgnoreCase(D4ST)==0)){ //Create REPORT TEMPLATE
|
|
|
|
|
|
|
|
|
|
String itemwithoutext = itemName.substring(0,itemName.lastIndexOf(D4ST)-1); //remove extension
|
|
|
|
|
|
|
|
|
@ -206,7 +208,7 @@ public class UploadServlet extends HttpServlet {
|
|
|
|
|
logger.trace("createTemplate: "+itemwithoutext);
|
|
|
|
|
createTemplate(wa, itemwithoutext, uploadItem.getInputStream(), destinationFolder, response);
|
|
|
|
|
|
|
|
|
|
}else if(MimeTypeUtil.isZipContentType(contentType) && (extension.compareToIgnoreCase(D4SR)==0)){ //Create REPORT
|
|
|
|
|
}else if(isZipFile && (extension.compareToIgnoreCase(D4SR)==0)){ //Create REPORT
|
|
|
|
|
|
|
|
|
|
String itemwithoutext = itemName.substring(0,itemName.lastIndexOf(D4SR)-1); //remove extension
|
|
|
|
|
|
|
|
|
|