I attached the file by Paperclip and then destroyed it like an object, but the asset file remains on the server.
How to delete this file?
I attached the file by Paperclip and then destroyed it like an object, but
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
calling destroy on the file should delete it –
@mymodel.myfile.destroy– although you would be MUCH better advised to use Amazon S3 to host your assets. Anything you upload into your app n Heroku that lives in tmp, public etc will not exist across dynos, or persist across restarts unless you’re using an external storage host like Amazon S3 etc.http://devcenter.heroku.com/articles/read-only-filesystem talks about it in detail.