Fork me on GitHub
#ring
<
2020-05-07
>
kwladyka21:05:14

How do you remove file after download it by client (web browser / API client)? So the client request , download the file and after all I want to remove the file what app generated.

jumar12:05:35

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

kwladyka18:05:43

I have to generate file during processing anyway

kwladyka18:05:50

yes, there are things which I wanted to avoid

kwladyka18:05:01

just wanted to do something after response complete

kwladyka18:05:07

so remove file in this case

jumar04:05:21

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

kwladyka17:05:56

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

kwladyka17:05:04

so I use external solutions in different laguages

kwladyka21:05:59

Any way to add action after response finish?