You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.
I might be missing something, but calls to putObjectWithFile don't actually set a mimetype anywhere before the AWS signature is generated. This results in the uploaded file having the incorrect mimetype when it's uploaded (so a browser, for instance, downloads it rather than displaying it if it can). If you change the mimetype after the signature has been generated your upload will be rejected due to a signature mismatch.
The mimetype is already being computed for the POST method but never gets properly set for a PUT. This annoyed me for a bit so I'm leaving it here - I don't have the time to do a proper pull request/test/etc, so maybe this helps someone else. Dealing with the official AWS libraries is a PITA in my experience so it'd be nice if this was kept up to date...
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I might be missing something, but calls to
putObjectWithFile
don't actually set amimetype
anywhere before the AWS signature is generated. This results in the uploaded file having the incorrectmimetype
when it's uploaded (so a browser, for instance, downloads it rather than displaying it if it can). If you change the mimetype after the signature has been generated your upload will be rejected due to a signature mismatch.My (hacky) fix was to add the following...
in
AFAmazonS3RequestSerializer.m
'srequestWithMethod:URLString:parameters:error
method:After that, I modified
AFAmazonS3Manager.m
and changedto
The mimetype is already being computed for the
POST
method but never gets properly set for aPUT
. This annoyed me for a bit so I'm leaving it here - I don't have the time to do a proper pull request/test/etc, so maybe this helps someone else. Dealing with the official AWS libraries is a PITA in my experience so it'd be nice if this was kept up to date...The text was updated successfully, but these errors were encountered: