Change the location of the paperclip tmp files
Is it possible to move ( /tmp/stream*
) tempfiles generated with paperclip to a different location, for example /railsapp/public/tmp
without changing the tmpfiles for the whole application environment? I would like to show a preview of the uploaded file if validation fails in the model.
a source to share
Saving downloads in Paperclip is such a problem. However, I used this module: http://ryantownsend.co.uk/articles/storing-paperclip-file-uploads-when-validation-fails.html along with https://github.com/formasfunction/remotipart
You can now do an Ajax file upload and save / view the image if something fails.
a source to share
This is not a paperclip setting. It just uses the file webserver it got from the user.
You need to set this at the web server level. If you are using Apache and Passenger, you will most likely want to set this parameter:
http://www.modrails.com/documentation/Users%20guide.html#_passengertempdir_lt_directory_gt
a source to share