如何通过亚马逊S3 API设置在上传时文件的权限 [英] How to set the permission on files at the time of Upload through Amazon s3 API

查看:2023
本文介绍了如何通过亚马逊S3 API设置在上传时文件的权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么办法来设置文件权限在通过亚马逊S3 API的文件上传的时间。

Is there any way to set the file permission at the time of uploading files through Amazon S3 API.

在我目前的解决方案,我能够上传的文件在我的水桶,但通过中提到的文件属性部分的URL我无法查看文件。当我路过访问键查询字符串,是开放。

In my current solution i am able to upload the file on my bucket but i can not view the file through the URL which is mentioned in the file properties section. It is opening when i am passing access keys in query string.

有没有在Amazon S3中所需的任何设置,或者我需要设置权限的所有文件在上传的时间。

Is there any settings required in Amazon S3 or i need to set the permissions to all the file at the time of upload.

在此先感谢。

卡迈勒·康德Pansari

Kamal Kant Pansari

推荐答案

添加一个头的PUT请求:

Add a header to your PUT request:

X-AMZ-ACL:公共阅读

这篇关于如何通过亚马逊S3 API设置在上传时文件的权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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