I’m on the free plan with Transloadit as I want to use their companion server to allow me to upload from Dropbox and Google Drive to my S3 Bucket.
Everything works fine when I upload from a local file, however when I try to launch the Dropbox (or Google Drive) plugin from the Dashboard modal (after logging in) I get a 401 unauthorised error from https://api2.transloadit.com/companion/dropbox/list/ and the Dropbox file browser window doesnt appear. Am I missing something? …sadly the documentation for these projects is amongst the worst of any project I’ve ever seen.
My code is listed below:
const params = JSON.stringify({
auth: { key: authKey, expires: expires },
steps: {
":original": { robot: "/upload/handle" },
export: {
use: [":original"],
robot: "/s3/store",
credentials: "MediaS3",
path: "uppy/${file.url_name}"
}
}
})
const signature = crypto.createHmac('sha1', authSecret).update(Buffer.from(params, 'utf-8')).digest('hex')
uppy = new Uppy({
debug: true,
autoProceed: false,
});
uppy.use(Transloadit, {
service: 'https://api2.transloadit.com', params: params, signature: signature
});
uppy.use(Dropbox, { companionUrl: Transloadit.COMPANION })
uppy.use(GoogleDrive, { companionUrl: Transloadit.COMPANION })
------
<DashboardModal
uppy={uppy}
plugins={['Dropbox', 'GoogleDrive']}
open={uppyOpen}
target={document.body}
onRequestClose={() => setUppyOpen(false)} />