我想将位于磁盘上的文件上传到 S3 并公开。
obj.file_attacher.assign(File.open(processed_file, binmode: true), upload_options: { acl: "public-read" })
上传作品,但文件不公开。obj.file_url
返回:
https://s3.amazonaws.com/my_bucket/my_ifle.mp3?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAWI2QZS65O5D6QAHF%2F20190624%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-D
我希望它obj.file_url
会返回纯 URL-s(没有签名等 ..):
https://s3.amazonaws.com/my_bucket/my_ifle.mp3