transloadit / uppy-server

[DEPRECATED] 'Uppy Server' was renamed to 'Companion' and lives inside the Uppy repo no
https://github.com/transloadit/uppy/tree/master/packages/%40uppy/companion
MIT License
114 stars 27 forks source link

Pass multipart form fields to upload endpoint #58

Closed goto-bus-stop closed 6 years ago

goto-bus-stop commented 6 years ago

Send the custom form fields defined by the Uppy client along to the upload endpoint. Allows eg. the AwsS3 plugin to work for remote files.

Fixes https://github.com/transloadit/uppy-server/issues/57

Tested using files from Google Drive & uploading to S3 using the AwsS3 plugin.

ifedapoolarewaju commented 6 years ago

Tested using files from Google Drive & uploading to S3 using the AwsS3 plugin.

@goto-bus-stop quick question about this, so for this to work, the request would not be signed right? So the aws accessKeyId (and maybe the secret) would be sent directly from the frontend instead?

goto-bus-stop commented 6 years ago

The request to S3 will be signed. The signature is sent along as a form field. The flow would look like this:

S3 doesn't check where the fields come from, they must just be signed correctly, which already happened in the previous step. So whether it's from uppy-server or a browser, both work. With uploads using a presigned PUT URL (so parameters that were not generated by uppy-server), it will still work, because the signature is in the URL query string.

Basically this is still working exactly the same way, the client still doesn't know anything about the access key or the secret key. The only difference between local and remote upload is that it's going to originate from a different machine.