-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Description
To get working on Heroku, I had to set the :path
in the call to has_attached_file
like so:
has_attached_file :avatar,
:styles => { :medium => '300x280>' },
:storage => :database,
:path => ':rails_root/public/system/:class/:attachment/:id_partition/:style/:filename'
It took me a little bit to work that out, as it wasn't really obvious what the issue was. The image would actually upload successfully, and the binary would appear in the image table - but the file_name and content_type properties would be empty so the image couldn't be retrieved via paperclip.
What's weird, is that ":rails_root/public/system/:class/:attachment/:id_partition/:style/:filename" is meant to be the default value for the :path
setting anyway according to the paperclip documentation.
Is this something that needs to be fixed in paperclip_database?
If not, maybe add a note about setting the :path
to the README?
Metadata
Metadata
Assignees
Labels
No labels