This allows you to set custom file permissions on files created by Paperclip. Set the :override_file_permissions option to the octal file permission you want - 0666 is the default. If you set :override_file_permissions to false, then we will skip the explicit chmod entirely. This makes filesystem storage a bit friendlier to filesystems that don't support unix file permissions.
This should fix an error when the user has turn on AWS logging while and upload a file with non-English filename, as `aws-sdk` logger is not encoding aware. The problem was that the string returned from another logger methods is in `US-ASCII`, while the string returned from Paperclip would be in `UTF-8`. When the logger calls `#join` on those strings, Ruby would raise an exception. This solution is not the best, as it involves a monkey-patching, but should make sure that the upload goes through without any hiccup. For the long run, I'm going to send a patch to `aws-sdk` and also make Paperclip require at least `aws-sdk > 1.4.1`
Needs work for S3 Attachments.
The new default :path and :include include the name of the model and also nests the model ID under a series of subdirectories, improving filesystem access speed when more than 1024 models have saved attachments. The easiest way to upgrade is to add an explicit :url and :path to your has_attached_file calls: has_attached_file :avatar, :path => ":rails_root/public/system/:attachment/:id/:style/:filename", :url => "/system/:attachment/:id/:style/:filename"
…s some failure modes
… it is with s3 storage.
In my opinion, a permission error should not result in the entire reprocessing job being terminated. Especially for large amounts of files, it's to be expected one or two have various permission issues. Instead of exiting, now simply print a warning to stderr.
…s the reprocess! method