This commit is contained in:
Francesco Mangiacrapa 2013-03-12 15:36:47 +00:00
parent a11c85b942
commit 1412b80a9c
1 changed files with 6 additions and 4 deletions

View File

@ -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