Fixed csv file delete

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@93338 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2014-03-19 16:42:18 +00:00
parent c61aefafac
commit 7bc754d149
2 changed files with 3 additions and 2 deletions

View File

@ -1705,7 +1705,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
String fileUrlOnStorage = filesStorage.storageCSVTempFile(user, String fileUrlOnStorage = filesStorage.storageCSVTempFile(user,
fileUploadSession.getCsvFile()); fileUploadSession.getCsvFile());
logger.debug("File Url On Storage:" + fileUrlOnStorage); logger.debug("File Url On Storage:" + fileUrlOnStorage);
fileUploadSession.getCsvFile().delete();
Map<String, Object> parameterInstance = csvImportFileParameter( Map<String, Object> parameterInstance = csvImportFileParameter(
fileUrlOnStorage, fileUploadSession, csvImportSession); fileUrlOnStorage, fileUploadSession, csvImportSession);

View File

@ -90,7 +90,7 @@ public class FileUtil {
public static void setImportFile(FileUploadSession fileUploadSession, InputStream is, String name, String mimeType) throws Exception public static void setImportFile(FileUploadSession fileUploadSession, InputStream is, String name, String mimeType) throws Exception
{ {
File csvTmp = File.createTempFile("import", "csv"); File csvTmp = File.createTempFile("import", ".csv");
csvTmp.deleteOnExit(); csvTmp.deleteOnExit();