Regarding the availability of req here when using s3 multipart, the uppy docs state:
req , the HTTP request, for regular S3 uploads using the @uppy/aws-s3 plugin. This parameter is not available for multipart uploads using the @uppy/aws-s3-multipart plugin;
My question is … why? I’m building the return value of getKey based on information from req. I had a look at @uppy/companion/lib/server/Uploader.js and see no reason why to pass null instead of req. I made 2 lines of changes and now pass req through. Works fine. The thing is … I’m trying not to modify your core code unless absolutely necessary, so I’m wondering why it was decided that req shouldn’t be available for s3 multipart.
This is kind of an intentional behaviour, but not a good behaviour. It’s done this way because we don’t have the request object that caused a file to be downloaded from a remote provider like Dropbox, when we start uploading the file to the destination.