如何添加缓存控制在AWS的S3?缓存、AWS

2023-09-11 08:34:26 作者:怂到爆再吃药

我提出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/
 
精彩推荐
图片推荐