Is there any way to set the file permission at the time of uploading files through Amazon S3 API.
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.
Is there any settings required in Amazon S3 or i need to set the permissions to all the file at the time of upload.
Thanks in Advance.
Kamal Kant Pansari
Add a header to your PUT request:
x-amz-acl: public-read
In C# when you create a response object of >mazon then in response method you will find
Addheader
.You need to set header as
Amazon providing these methods in its web services API kindly refer that.
You can also use Bucket Policies feature.
Here is an example of bucket policy that instructs amazon s3 to make all of the files publicly available, including new files you will upload:
Replace your.bucket.name with your actual bucket name
You can view and edit Bucket Policies with S3 Browser Freeware. You can find more Bucket Policies examples here.