When uploading dataset template xmls delete the working directory copy of the file
This commit is contained in:
parent
418d29b7d5
commit
2390a33a98
|
@ -199,7 +199,10 @@ public class DatasetProfileManager {
|
|||
public eu.eudat.logic.utilities.documents.xml.datasetProfileXml.datasetProfileModel.DatasetProfile createDatasetProfileFromXml(MultipartFile multiPartFile) {
|
||||
ImportXmlBuilderDatasetProfile xmlBuilder = new ImportXmlBuilderDatasetProfile();
|
||||
try {
|
||||
return xmlBuilder.build(convert(multiPartFile));
|
||||
File localFile = convert(multiPartFile);
|
||||
eu.eudat.logic.utilities.documents.xml.datasetProfileXml.datasetProfileModel.DatasetProfile profile = xmlBuilder.build(localFile);
|
||||
Files.deleteIfExists(localFile.toPath());
|
||||
return profile;
|
||||
} catch (IOException e) {
|
||||
logger.error(e.getMessage(), e);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue