I'm using prawn to generate my pdf files and what i'd like to do is to show them in the browser window and at the same time download them to the file system.
I already read this - Rails, Prawn - PDF show up in browser & etc - but it's not what i'm looking for, because using the Prawn render_file
, causes to save the pdf file in a project folder, whereas i want the docs to be saved in the user filesystem, in a download folder chosen by the user obviously (which can be done with the Rails send_file
or send_data
).
So i was looking if it is possible to use the send_file
at the same time to download the file and to show it in the browser window, but i didn't find anything.
Other solutions are welcome :)