I’m using the S3 (non-multipart) uploader with Uppy, and I used to have this code after a successful upload:
uppy.on('upload-success', (file, response) => {
// Get S3 key from upload.
const data = {
key: response.body.key,
};
// Store data (with key) in db (code not shown).
This was working with Uppy 2.. and now I’m trying to upgrade to 4.. and the key is no longer showing up in the response data. Any pointers to get it to show up again?
Thanks @Merlijn . I’m not exactly sure what to look for in the Network tab but I do see two with the name of my bucket, e.g. https://my-bucket.s3.us-east-1.amazonaws.com/.
The first is an OPTIONS request with a 200 status but no response. It’s type and initiator is Preflight.
The second is an xhr request from uppy.js with a 201 status, which has an XML response that does in fact have the key in it; it looks like this:
@Merlijn is it possible it’s related to getResonseData? Trying to piece together the uppy flow when using S3 and having a hard time figuring out everything involved.
Other ideas are something with Body or AwsBody, e.g. this change: