Update:
Got this code, it almost works. The problem is that transloadit plugin seems to want to have an assembly with steps. If I remove the plugin, I can’t configure the transloadit key because it is configured in transloadit and not in S3 plugin.
Another issue - how do I tell transloadit to generate signed URLs to Wasabi? In the console I have defined Wasabi under Credentials > Third party credentials . Is this enough?
const uppy = Uppy.Core({
debug: true,
autoProceed: false,
restrictions: {
maxFileSize: 31457280, /*30 MB. TODO: take from input data attribute*/
maxNumberOfFiles: 0,
minNumberOfFiles: 0,
allowedFileTypes: ['image/*', 'video/*']
}
});
const AwsS3Multipart = Uppy.AwsS3Multipart;
const Transloadit = Uppy.Transloadit;
const Dashboard = Uppy.Dashboard
uppy.use(AwsS3Multipart, {
limit: 0,
companionUrl: Transloadit.COMPANION
})
.use(Dashboard, {
trigger: '.form-data-upload-button',
inline: false,
target: 'body',
replaceTargetContent: false,
showProgressDetails: true,
note: null,
metaFields: [
{ id: 'name', name: 'Name', placeholder: 'file name' },
{ id: 'caption', name: 'Caption', placeholder: 'describe what the image is about' }
],
browserBackButtonClose: false
})
.use(Uppy.Webcam, { target: Dashboard })
.use(Uppy.ScreenCapture, { target: Dashboard })
.use(Uppy.ImageEditor, { target: Dashboard })
.use(Transloadit, {
importFromUploadURLs: true, /*this was an attempt to make the files not upload to transloadit*/
params: {
auth: { key: 'REDACTED' },
steps: {} /*this doesn't work*/
}
})