-
Notifications
You must be signed in to change notification settings - Fork 2k
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
upload-success not setting uploadURL correctly #5388
Comments
Hi, I just tested locally and I do get the complete file path. Are you on latest versions of everything? |
Yes, (This is using DigitalOcean Spaces as S3 storage - though this has worked fine for us with previous versions of Uppy). |
It works for me for S3 and we don't officially support or test against DigitalOcean Spaces. If you can reproduce on S3 that would be great. Otherwise you may have to contribute yourself to fix it. |
I have the same issue with AWS S3 where it returns only the base bucket URL. |
+1 I also use AWS S3 and I can see the uppy uploaded file in S3 cache folder. not using Companion but Shrine plugin "@uppy/aws-s3": "^4.0.3", gem "shrine", "~> 3.6.0" this is a complete example response (notice the weird "": "" key in the reponse body key which might be a clue): { |
When using Seems that every other uploading method in
, and then adding the No such luck with the nonMultipartUpload method. |
The multipart upload (shouldUseMultipart = true) returns the full URL but the nonMultipartUpload doesn't. It's just a bucket URL. :( |
+1 that this is broken for:
|
I'm trying locally with |
Seeing the same behavior in v4. @Murderlon here are the file and data objects I get in the |
Managed to reproduce, working on a fix |
the problem seems to appear when the s3 bucket does not have the correct CORS policy configured as described in the docs - in particular uppy/packages/@uppy/aws-s3/src/index.ts Line 767 in 6d413f5
but apparently that null/undefined check broke in a refactor (another reason to have strict types #5336). I've now created a PR #5505 that restores the behavior where it will warn when CORS is not configured properly. |
Initial checklist
Link to runnable example
No response
Steps to reproduce
Using self hosted Companion and uppy-svelte, we used to use
upload-success
to get the path of the uploaded file to S3 fromresult.body.key
which worked great using version 3. Now, after upgrading to v4.1 (and the companion to v5) and seeing thatupload-success
has changed such that we're supposed to be getting the path fromresult.uploadURL
, we find that theuploadURL
is always just set to the bucket's base URL without anything for the uploaded file itself.Inspecting the networking traffic between browser and companion, we see that the response from companion has the filepath under
fields.key
. So it seems there's some mismatch between the latest companion and the latest client lib?https://uppy.io/docs/uppy/#upload-success
Expected behavior
result.uploadURL
is the complete file's path on S3 (i.e. abucket-url/UUID-filename
)Actual behavior
result.uploadURL
is just the bucket's URLThe text was updated successfully, but these errors were encountered: