我想将磁盘上的文件上传到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(没有签名等):
https://s3.amazonaws.com/my_bucket/my_ifle.mp3