Skip to content

Instantly share code, notes, and snippets.

@stevepentler
Last active December 15, 2017 23:20
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 stevepentler/a3bfc588d6e214eeb9a0af9120dcbe21 to your computer and use it in GitHub Desktop.
Save stevepentler/a3bfc588d6e214eeb9a0af9120dcbe21 to your computer and use it in GitHub Desktop.
Filestack V3 with BF settings
client.makeDropPane({
id: "dropZone",
overlay: false,
disableClick: true,
customText: "Drag and drop your pizza here",
onDragEnter: evt => console.log(evt),
onDragLeave: evt => console.log('leaving'),
onDrop: evt => console.log(evt),
onSuccess: function(files) {console.log('pizza delivery');},
onClick: function() {
client.pick({
disableThumbnails: true,
maxFiles: 1000,
maxSize: 1024*1024*1024*10, // 10 Gb is our plan limit
fromSources: ['local_file_system', 'googledrive', 'dropbox', 'box', 'instagram', 'facebook'],
uploadConfig: {
timeout: 180000,
intelligentChunkSize: 4 * 1024 * 1024
},
storeTo: {
location: 's3'
}
}).then(function(result) {
console.log(result.filesUploaded[0].url);
});
},
},{
disableThumbnails: true,
maxFiles: 1000,
maxSize: 1024*1024*1024*10, // 10 Gb is our plan limit
fromSources: ['local_file_system', 'googledrive', 'dropbox', 'box', 'instagram', 'facebook'],
uploadConfig: {
timeout: 180000,
intelligentChunkSize: 4 * 1024 * 1024
},
storeTo: {
location: 's3'
}
}).then(function(result) {
console.log(result.filesUploaded[0].url);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment