CarrierWave S3 Permission denied error trying to read from the tmp
Using CarrierWave and Amazon S3. CarrierWave config:
CarrierWave.configure do |config|
config.ensure_multipart_form = false
config.permissions = 0777
config.s3_access_key_id = 'secret_access_key_id'
config.s3_secret_access_key = 'secret_access_key'
config.s3_bucket = 'backet_name'
end
I get a permission denied error trying to read from the tmp directory when uploading to s3.
Errno::EACCES
Permission denied - D:/MyDirectory/public/uploads/tmp/20110211-1021-3252-6545开发者_Go百科/my_file.txt.
What's wrong?
I had this issue using Heroku, and solved it by changing the cache directory in the uploader.
def cache_dir
"#{Rails.root}/tmp/uploads"
end
精彩评论