changing model-path for paperclip
I set in an initializer the save-path of paperclip to a new one and everything is fine.
But some attachment-names (like file) are very abstract:
has_attac开发者_JAVA百科hed_file :file, :styles => {
:thumb => "100x100"
}
I want this one within the new save-path, but in a different folder than 'file'. Is that possible, without changing the attachment_name?
For example: Now I'm have something like /save-path/file/thumb, but I want /save-path/my-new-file-name/thumb.
You can manipulate both path and url of the attachment(s) with the Paperclip interpolations. See https://github.com/thoughtbot/paperclip/wiki/interpolations for further reference.
精彩评论