是否可以在不下载整个对象的情况下更改 S3 对象的标头? [英] Is it possible to change headers on an S3 object without downloading the entire object?

查看:26
本文介绍了是否可以在不下载整个对象的情况下更改 S3 对象的标头?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将一堆图像上传到 Amazon S3,现在想向它们添加 Cache-Control 标头.

I've uploaded a bunch of images to Amazon S3, and now want to add a Cache-Control header to them.

可以在不下载整个图像的情况下更新标题吗?如果是,怎么办?

Can the header be updated without downloading the entire image? If so, how?

推荐答案

这是测试版功能,但您可以在 复制一个对象.为副本指定相同的源和目标,这只会更新对象上的元数据.

It's beta functionality, but you can specify new meta data when you copy an object. Specify the same source and destination for the copy, and this has the effect of just updating the meta data on your object.

PUT /myObject HTTP/1.1
Host: mybucket.s3.amazonaws.com  
x-amz-copy-source: /mybucket/myObject  
x-amz-metadata-directive: REPLACE  
x-amz-meta-myKey: newValue

这篇关于是否可以在不下载整个对象的情况下更改 S3 对象的标头?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆