是否有可能改变一个S3对象上的标题,而无需下载整个对象? [英] Is it possible to change headers on an S3 object without downloading the entire object?

查看:161
本文介绍了是否有可能改变一个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天全站免登陆