Paperclipped on Heroku?
You may save images to the log
and tmp
directories.
However, that's a horrible, horrible idea.
If you
git push heroku
, your application will be deployed to a new dyno. The new dyno will not have the images, and the images will be forever gone.If you have two dynos, and one dyno saves the image, the image will not be available to the next dyno.
So, effectively, there is no good way to save images to the filesystem.
If you want, you can write your own an adapter for Paperclip that will store images in the database.
But really, you should store images in S3 when you use Paperclip on Heroku, because it's the easy default way to do it.
You can't write to Heroku's file system, so no, there is no way to save images the way you want. Your options are using a service like S3, or storing them in the database. I recommend using S3, because databases are not optimized for file storage. It's worth reading Heroku's documentation on file uploads.
As an aside, this is also the same reason why SASS requires a plugin on Heroku, limited access to disk. I use Paperclip in a number of apps on Heroku, as others have said, S3 hands down is the way to go.