如何添加缓存控制在AWS的S3? [英] how to add cache control in AWS S3?

查看:190
本文介绍了如何添加缓存控制在AWS的S3?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我提出20000文件AWS S3由s3cmd命令。现在我想添加缓存控制所有图像(.JPG)

I have moved 20000 files to AWS S3 by s3cmd command. Now i want to add cache-control for all images (.jpg)

这些文件位于(S3://桶名/图像/)。我怎样才能通过s3cmd添加缓存控制所有图像或有添加页眉任何其他方式?

These files are located in ( s3://bucket-name/images/ ). How can i add cache-control for all images by s3cmd or is there any other way to add header ?

感谢

推荐答案

请尝试目前上游主分支( https://github.com / s3tools / s3cmd ),因为它现在有一个修改命令,使用方法如下:

Please try the current upstream master branch (https://github.com/s3tools/s3cmd), as it now has a modify command, used as follows:

./s3cmd --recursive modify --add-header="Cache-Control:max-age=86400" s3://yourbucket/

这篇关于如何添加缓存控制在AWS的S3?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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