【发布时间】:2019-10-06 21:31:00
【问题描述】:
我想为通过 Active Storage 上传到 S3 的文件设置缓存控制。
rails repo (link here) 中有这一行:
object_for(key).put(body: io, content_md5: checksum, content_type: content_type, **upload_options)
所以我知道如果 **upload_options 中有 :cache_control 键,它可以工作。 (链接到 aws 参考 here)
如何在upload_options中正确设置一些东西?
【问题讨论】:
标签: ruby-on-rails ruby amazon-s3 rails-activestorage