Open Orvisky opened 8 years ago
And why do you need this? These files are generated inside dedicated folder and the reaper module is taking care of removing the old ones. This is all provided through jsreport-core by default.
I need this, because we have strict temp file policy by sys admins. And i have to remove files, right after they are in res
buffer.
I figure that it is simple, you just have to add this:
response.export = {
fileName: id
};
This policy applies just to the OS temp folder right? You can change the jsreport tempDirectory configuration to the folder where you have no policies and you should be fine right?
No, node.js server is installed in classic server farm outside the company. We have limited space, and memories etc. on this exports. And policy is, when i create some tmp files, and download them, i have to remove them from servers manually in codes.
So when i download pdf from stream, i have to remove them manually, ex. via fs.unlinkSync(...)
. That is why i need that id
returned.
Hi,
pls can you make small modification, that will return auto-generated file name? Because it is impossible to delete generated files, because names are automatically generated and hash is not returned.
Thank you