Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Read Object POST Parameters from Form Fields #204

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

lscspirit
Copy link

According to AWS S3 documentation, in a POST object request, parameters are passed through the multipart form instead of as HTTP headers (see http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPOST.html). This change makes Fake S3 parse and use parameters from the multipart form in the case of a object POST request.

This change is needed to properly handle a presigned object POST request. At the moment, FakeS3 would create an object under the wrong content type multipart/form-data because that's what the 'Content-Type' header said in the HTTP POST request; yet, the correct content type is passed along as one of the multipart form field of the request.

@summera
Copy link

summera commented Oct 24, 2017

@lscspirit @jubos I had an issue with Content-Type when using fake-s3 with multipart uploads because my server validates Content-Type. This fixed my issue. 👍

@lscspirit
Copy link
Author

Any chance of getting this pull request merged?

@rposborne
Copy link

rposborne commented Jan 7, 2018

@jubos What are your thoughts on this? Would love to see this in master.

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

Successfully merging this pull request may close these issues.

None yet

3 participants