使用 CarrierWave 和 Amazon S3。载波配置:
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
上传到 s3 时,尝试从 tmp 目录读取时出现权限被拒绝错误。
Errno::EACCES
Permission denied - D:/MyDirectory/public/uploads/tmp/20110211-1021-3252-6545/my_file.txt.
怎么了?