Fixes Dataset export doc and pdf not deleting the in memory files.
This commit is contained in:
parent
e344f7ce6e
commit
6818eaf8bf
|
@ -150,8 +150,9 @@ public class DatasetWizardController extends BaseController {
|
|||
responseHeaders.get("Access-Control-Expose-Headers").add("Content-Type");
|
||||
|
||||
byte[] content = IOUtils.toByteArray(resource);
|
||||
//Files.deleteIfExists(pdffile.toPath());
|
||||
//Files.deleteIfExists(file.toPath());
|
||||
resource.close();
|
||||
Files.deleteIfExists(file.toPath());
|
||||
Files.deleteIfExists(pdffile.toPath());
|
||||
return new ResponseEntity<>(content,
|
||||
responseHeaders,
|
||||
HttpStatus.OK);
|
||||
|
|
|
@ -285,6 +285,7 @@ public class DatasetManager {
|
|||
FileOutputStream output = new FileOutputStream(resultPdf);
|
||||
IOUtils.write(queueResult, output);
|
||||
output.close();
|
||||
Files.deleteIfExists(file.toPath());
|
||||
|
||||
return resultPdf;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue