Dynamically change destination

Hi All,

Is it possible to change the destination in real time? I would like that files uploaded via remote sources (G Drive, Dropbox) will be uploaded to my server (xhr) and locally uploaded files to be uploaded to GCS (aws-s3).

Thanks!

1 Like

I think for your specific case the answer is no, unfortunately. You can change the endpoint for a particular plugin using uppy.getPlugin('XHRUpload').setOptions({ endpoint: 'myendpoint.com/upload' }), but that will apply to all files. There is sort-of a way to use different endpoints for different files as described in the comments on this issue. There is no way to direct different files to different plugins at the moment, except for using two Uppy instances with different configurations, and then your users would have to pick the correct one.

Renée, thanks for the elaborate answer.