Hi there,
We are using Uppy for our uploads and are supporting both regular upload and multipart to S3. We’ve upgraded our Uppy to the latest version including the new @uppy/aws-s3 package. We’ve noticed since doing that and implementing the new option for shouldUseMultipart
that the uploadUrl
is now missing from our Uppy files.
Our S3 bucket is configured to expose the Location header and we’ve verified that using the legacy package by not setting shouldUseMultipart
does return the uploadUrl
.
Is there something additional that needs to be done with the new package in order to retrieve this value? We currently use it to move files from a unique temporary upload directory into our permanent directory once upload has been completed.
const uppy = computed(() => {
uppyInstance.value = new Uppy({
id: props.fieldId,
autoProceed: true,
locale: currentLocale.value,
restrictions: {
maxFileSize: props.maxFileSize,
allowedFileTypes: props.accept,
maxNumberOfFiles: props.maxNumberOfFiles,
},
});
uppyInstance.value.use(ThumbnailGenerator, {
thumbnailWidth: 400,
});
uppyInstance.value.use(AwsS3, {
companionUrl: '/media/upload',
companionHeaders: {
'uppy-auth-token': `token here`,
},
limit: 6,
shouldUseMultipart: (file) => file.size > 100 * 2 ** 20,
});
return uppyInstance.value;
});
uppy.value.on('upload-success', async (file: any, response: any) => {
console.log(uppy.value.getFile(file.id));
});
// logged file
{
"source": "",
"id": "uppy-191211shoes/01cw/jpg-2v-1e-image/jpeg-470968-1694627797000",
"name": "191211Shoes_01CW.jpg",
"extension": "jpg",
"meta": {
"name": "191211Shoes_01CW.jpg",
"type": "image/jpeg"
},
"type": "image/jpeg",
"data": {},
"progress": {
"uploadStarted": 1695394630424,
"uploadComplete": true,
"percentage": 100,
"bytesUploaded": 470968,
"bytesTotal": 470968,
"postprocess": null
},
"size": 470968,
"isRemote": false,
"remote": "",
"preview": "blob:http://localhost:5173/d1447275-0301-422d-b961-3e2487b2d32f",
"response": {
"body": {
"ETag": "\"ccda77e8024823469ad652cbbeec3108\""
}
},
"isPaused": false
}