问题
I have created a simple ROR application and installed paperclip with this configuration
has_attached_file :attachment,
:path => ":rails_root/public/system/:attachment/:id/:filename",
:url => "/system/:attachment/:id/:filename
then i created a simple form that takes the file as input from the user web browser, after that the file url is being displayed model.attachment.url
and the user can download the file again.
I tried to run some linux commands to know where are downloaded files are stored 'ls /app/public/system/attachments/'
but couldn't all my uploaded files.
Also some files are being uploaded but when trying to get them back i receive 404 error!
has any one experienced such problem before?
回答1:
Heroku keeps paperclip uploaded images for few minutes then automatically removes them, it only keeps images residing in assets. To keep docs or images you need amazon s3 or other web services
来源:https://stackoverflow.com/questions/20104005/where-does-heroku-store-uploaded-files-when-using-paperclip