Skip to content

Instantly share code, notes, and snippets.

@ethanwillis
Forked from bwalton/robodog-tests.js
Last active March 1, 2021 02:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ethanwillis/9ef393d11d681cd53858652d0646a224 to your computer and use it in GitHub Desktop.
Save ethanwillis/9ef393d11d681cd53858652d0646a224 to your computer and use it in GitHub Desktop.
var uppy = window.Robodog.pick({
providers: [],
waitForEncoding: true,
autoProceed: true,
restrictions: {
maxNumberOfFiles: 1,
maxFileSize: (250*1024*1024),
allowedFileTypes: ['.jpg', '.jpeg', '.png']
},
params: {
auth: { key: "" },
template_id: ''
}
});
uppy.on('transloadit:complete', function(assembly) {
console.log(assembly);
});
uppy.on('error', function(error) {
if(error.assembly) {
console.log("Assembly ID " + error.assembly.assembly_id} + " failed");
console.log(error.assembly);
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment