Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

uploading with public-read permissions #44

Closed
vinced45 opened this issue Apr 14, 2014 · 6 comments
Closed

uploading with public-read permissions #44

vinced45 opened this issue Apr 14, 2014 · 6 comments

Comments

@vinced45
Copy link

I'm trying to upload a file with public-read permissions but have been unsuccessful. Here is the call I'm trying to do to add the acl to the header:

[s3Manager.requestSerializer setValue:@"public-read" forHTTPHeaderField:@"x-amz-acl"];
@SebastianThiebaud
Copy link
Contributor

Same problem here.

@AaronMeyers
Copy link

I'm having this problem as well. Using the above line to set the x-amz-acl header field actually does seem to work when I use the putObjectWithFile method, but if I use the postObjectWithFile method, it doesn't seem to set the permissions properly.

I'd be ok with that, but I'm having a problem when using PUT... the .mov file I'm uploading comes back with the following header in the file itself (making it unplayable)

--Boundary+A10C94F97193555F
Content-Disposition: form-data; name="key"

square_movie.mov
--Boundary+A10C94F97193555F
Content-Disposition: form-data; name="file"; filename="square_movie.mov"
Content-Type: video/quicktime

This could be my fault, but probably belongs in an issue on its own.

@SebastianThiebaud
Copy link
Contributor

Updating this works for me:

https://github.com/evoL/AFAmazonS3Client/pull/1/files

@AaronMeyers
Copy link

ah thanks. that did indeed solve the headers in the uploaded file when using a PUT method.

it also seems to impact the POST method -- now after the progress reaches 100%, it fails with this error: Request failed: precondition failed (412)

I'm not really sure why you'd need to use a POST over a PUT for simply uploading files to S3 though...

@mattt
Copy link
Contributor

mattt commented Nov 29, 2014

Fixed by cc21e90.

@mattt mattt closed this as completed Nov 29, 2014
@vijaytholpadi
Copy link

Thanks a ton! Came in quite handy.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants