git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@71246 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
a11c85b942
commit
1412b80a9c
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue