Skip to content

Instantly share code, notes, and snippets.

@julianpoy
Last active July 2, 2018 22:38
Show Gist options
  • Save julianpoy/eb92a773924394ac6c8a07447eb5e6fc to your computer and use it in GitHub Desktop.
Save julianpoy/eb92a773924394ac6c8a07447eb5e6fc to your computer and use it in GitHub Desktop.
var client = filestack.init(window.FILESTACK_KEY);
client.pick({
accept: [
// Image
'image/*',
'.psd',
// Video
'video/mp4',
'video/quicktime',
'.mov',
// Audio
'audio/mpeg',
'audio/mp3',
'.mp3',
'audio/wav',
'audio/x-wav',
'.wav',
// Document
'.pdf',
'application/pdf',
'.doc',
'application/msword',
'.docx',
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'.odt',
'application/vnd.oasis.opendocument.text',
// Spreadsheet
'.xls',
'application/vnd.ms-excel',
'.xlsx',
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
'.ods',
'application/vnd.oasis.opendocument.spreadsheet',
// Presentation
'.ppt',
'application/vnd.ms-powerpoint',
'.pptx',
'application/vnd.openxmlformats-officedocument.presentationml.presentation',
'.odp',
'application/vnd.oasis.opendocument.presentation',
// Other
'.html',
'text/html',
'.txt',
'text/plain',
'.ai',
'application/illustrator'
],
fromSources: UPLOAD_SOURCES,
storeTo: {
location: 's3'
},
lang: 'en',
maxFiles: 20
}).then(function(result) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment