-
Notifications
You must be signed in to change notification settings - Fork 232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
POST uploads #73
Comments
This commit lacks support for policies. References #73.
@auguster I implemented basic support for POST uploads -- can you test to see if it resolves your issue? Note that S3Proxy still lacks support for policies. |
Thanks you for the news ! |
Is it planned to be merged? |
S3Proxy has partial POST upload support although there are a lot of extra bits. Do you need one feature in particular? |
We currently migrating from S3 to Azure Blob Storage and to upload files from the client, our API creates a PostObject, which seems to work with the proxy (at least I get similar "form fields"). But when I submit the form I get a "Not Implemented" error. |
Could you share some example source code? Also maybe dump logs via |
How I use the php aws sdk: $options = [
['acl' => 'public-read'],
['bucket' => $bucket],
['starts-with', '$key', $key],
['content-length-range', 0, 1024 * 1024 * 1024],
];
/** @var \Aws\S3\S3Client $s3 */
$s3 = app('s3');
$postObject = new PostObjectV4($s3, $bucket, $inputs, $options);
$attributes = $postObject->getFormAttributes();
$fields = $postObject->getFormInputs(); this is an example response: {
"attributes": {
"action": "http://localhost:8080",
"method": "POST",
"enctype": "multipart/form-data"
},
"fields": {
"acl": "public-read",
"key": "filename.ext",
"X-Amz-Credential": "*******",
"X-Amz-Algorithm": "AWS4-HMAC-SHA256",
"X-Amz-Date": "20180418T063726Z",
"Policy": "**************",
"X-Amz-Signature": "************"
}
} The above mentions field are used to submit the form with a file called This is the exact error message: <?xml version='1.0' encoding='UTF-8'?>
<Error>
<Code>NotImplemented</Code>
<Message>A header you provided implies functionality that is not implemented.</Message>
<RequestId>4442587FB7D0A2F9</RequestId>
</Error> Unfortunately I can't or I don't know how to set the DLOG_LEVEL. I am using docker and if I am adding it after |
any updates? :/ |
The Docker image should take a |
@ck86 I'm facing this issue at the moment, did you manage to find a work around? |
@simonbowen unfortunately not. I switched to another proxy and used the signed URLs to upload a file. |
@ck86 Can you tell me the name of the other proxy you used? I'm looking at using LocalStack instead at the moment. |
minio |
Thanks
|
As suggested in #73 (comment), if someone can provide a self-contained test I can add missing functionality but I don't want to commit to all possible features of POST uploads right now. |
@gaul Thanks for the response. Also thanks for this great package. I'm not a Java developer and writing a test for this use case is going to be beyond me. I had dropped this into my development environment via docker and it worked great up until the HTTP POST upload. |
@simonbowen If you can provide a self-contained test, either via unit test, curl, or whatever, I can likely add the required functionality easily. Unfortunately figuring out how to even run something like #73 (comment) is likely more work than the fix. |
@gaul I'm not sure I can just give you an example curl request, since I have to make a request to get the fields (via a request) and then use those fields in a subsequent request. All I'd be doing is converting above into a bash script. As I said already, I am not capable of writing a unit test in Java (sorry). |
Try turning logging up to trace level and see which parameter fails? |
Here's a simple failure
because the code tests if the parameter value is empty rather than if the parameter is present
|
@liamwhite Which S3 client do you use to access S3Proxy? The Note that this issue tracks browser-based POST uploads and your logs correspond to the unrelated CreateMultipartUpload RPC which confusingly has a POST HTTP verb and an |
This is coming from the ExAws client. |
Two behaviour differences I’ve noticed compared to the real S3 service when testing browser POSTs are:
|
S3Proxy does not currently support POST uploads, triggering many s3-tests failures:
The text was updated successfully, but these errors were encountered: