How do you remove file after download it by client (web browser / API client)?
So the client request <https://example.com/api/generate-magic-file>
, download the file and after all I want to remove the file what app generated.
You could stream the content directly and thus avoid generating the file altogether. Or you implement a periodic cleanup process (Cron job)
I have to generate file during processing anyway
yes, there are things which I wanted to avoid
just wanted to do something after response complete
so remove file in this case
Why do you need to create the file on the disk when it's only purpose is to be sent over the wire?
because I am using converter to PDF and later another library to rotate pages ….. generally generating PDF when you have to care about each 1mm is so bad in Java
so I use external solutions in different laguages
Any way to add action after response finish?