0

Am making a fileuploader in my website with filestack and ran into a requirement on which i need some assistance. My code is as follows...

const apikey = 'ASDSDSJHKJHJHK';
const client = filestack.init(apikey); 

var options ={
 onUploadDone: (res) => console.log(res), 

"accept": [
    ".pdf",
    "image/jpeg",
    "image/png"
],
"fromSources": [
    "local_file_system"
],
"transformations": {
    "crop": true,
    "circle": true,
    "rotate": true
},
"hideModalWhenUploading": true
};

const picker = client.picker(options); 
picker.open();

Now i want to use this 'onProgress' callback to update a particular '' with the current progress status. https://filestack.github.io/filestack-js/interfaces/uploadoptions.html#onprogress

when i try to add this as follows...

var options = {
 onProgress: (res) => console.log(res)
}

it is throwing error invalid parameter passed. I was wondering how do i pass this call back to get my desired output ?

Joseph
  • 21
  • 5

0 Answers0