Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我们调用方法时,可以使用参数定义url值。X-AMZ-Expiresexpires_in
url
X-AMZ-Expires
expires_in
有没有办法在 Shrine 的配置文件或上传器中定义它,这样每次我打电话时url我都不需要给出 的值expired_in?
expired_in
是的,你可以通过url_options插件做到这一点:
url_options
Shrine.plugin :url_options, store: { expires_in: 60*60 }
添加到上面的答案:这最近已更改为 default_url_options:
Shrine.plugin :default_url_options, store: { expires_in: 60*60 }