ring

kwladyka 2020-05-07T21:06:14.061400Z

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.

jumar 2020-05-08T12:22:35.063700Z

You could stream the content directly and thus avoid generating the file altogether. Or you implement a periodic cleanup process (Cron job)

kwladyka 2020-05-08T18:40:43.063900Z

I have to generate file during processing anyway

kwladyka 2020-05-08T18:40:50.064100Z

yes, there are things which I wanted to avoid

kwladyka 2020-05-08T18:41:01.064300Z

just wanted to do something after response complete

kwladyka 2020-05-08T18:41:07.064500Z

so remove file in this case

jumar 2020-05-11T04:42:21.064700Z

Why do you need to create the file on the disk when it's only purpose is to be sent over the wire?

kwladyka 2020-05-12T17:20:56.065900Z

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

kwladyka 2020-05-12T17:21:04.066100Z

so I use external solutions in different laguages

kwladyka 2020-05-07T21:06:59.061700Z

Any way to add action after response finish?