0

I'm implementing Filestack using its JavaScript library and want to start the upload process by clicking a button.

According to its documentation, the uploadInBackground is used to facilitate this but in my implementation, it seems to have no effect. Here's the documentation: https://www.filestack.com/docs/uploads/pickers/web/#upload-options

Here's my picker setup:

const apikey = 'MY_API_KEY';
const client = filestack.init(apikey);
const options = {
   displayMode: 'dropPane',
   container: '#drop-container',
   fromSources: ["local_file_system"],
   maxFiles: 20,
   uploadInBackground: false,
   disableTransformer: true,
   onUploadDone: (res) => fileUploadSuccess(res),
};
const filestackPicker = client.Picker(options);

and then I open it with filestackPicker.open();

I'm just doing simple file uploads for any kind of file. The only important point here is that I want the dropPane approach so that users can either select their files or drag and drop them.

How can I start the upload by clicking a button and NOT automatically after files are selected or dragged and dropped?

Sam
  • 26,817
  • 58
  • 206
  • 383

0 Answers0