-
Notifications
You must be signed in to change notification settings - Fork 21
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
Missing "parts" parameter for /complete #26
Comments
Thanks for the detailed report. Do you know what might have changed since the initial creation of the gem? Are you using Rack 2 or 3? Is this something that stopped working in Uppy 3, or did it also not work on Uppy 2? I don't know why Uppy Companion is intrepreting |
I'm using I guess then this is rather sounds like bug in Uppys handling of the |
I opened an issue in the Uppy project: transloadit/uppy#4219 |
This is a workaround until the Uppy frontend client correctly handles `Access-Control-Allow-Headers: *`. See janko#26 and transloadit/uppy#4219
The issue was fixed in transloadit/uppy#4221 and is part of @uppy/companion-client 3.1.1. |
I'm in the process of switching from the
presign_endpoint
plugin to multipart uploads, but during the last step when calling/complete
the parts parameter is missing:I found that the parameter is encoded in the request body but does not get parsed into the
request.params
object as the content type is not set toapplication/json
which is required to add the request payload to the params (see Jeremy Evans' comment here).As described in the Uppy AWS S3 Multipart plugin docs I tried setting the
companionHeaders
like this:However this header gets ignored because the
OPTIONS /s3/multipart
response headers containAccess-Control-Allow-Headers: *
:Uppy excludes headers that are not in this list of allowed headers if it's set, see
https://github.com/transloadit/uppy/blob/main/packages/@uppy/companion-client/src/RequestClient.js#L115-L126
and
https://github.com/transloadit/uppy/blob/main/packages/@uppy/companion-client/src/RequestClient.js#L145-L146, so since it's set to
*
which is not a valid header key it excludes all the headers as in the logs screenshot above.I could make it work by setting the
Content-Type
as allowed request headers in theOPTIONS
endpoint here.How could I solve this?
I think a way to set the response headers via a configuration option like e.g. for the
create_multipart_upload
endpoint would solve the issue.I imagine other people would have encountered this already if this would be a general problem.
Do I have my Rails app configured incorrectly so that it returns the
*
in theAccess-Control-Allow-Headers
header?The text was updated successfully, but these errors were encountered: