I am currently working with Filestack (Filepicker) V3 to upload multiple files and retrieve filename, url, and mimetype. Based on the Filestack documentation for this latest release and a previous question that was asked here, I have implemented the following code:
var client = filestack.init('myapikey');
client.pick({
accept: 'image/*',
fromSources: ['local_file_system','googledrive','gmail','facebook','dropbox','onedrive','webcam'],
maxFiles: 5,
imageMax: [1024, 1024]
}).then(function(Blobs) {
console.log(JSON.stringify(Blobs));
var result = "";
for(var i=0; i<Blobs.length; i++){
result+=Blobs[i].filename + " : " + Blobs[i].url + " : " + Blobs[i].mimetype;
}
alert(result);
});
For example, when uploading 2 files, the console output looks like this:
{"filesUploaded":[{"filename":"diploma1.jpg","handle":"1e3CkeZQaeokzS9TpcJM","mimetype":"image/jpeg","originalPath":"diploma1.jpg","size":258169,"source":"local_file_system","url":"https://cdn.filestackcontent.com/1e3CkeZQaeokzS9TpcJM","originalFile":{"customName":"diploma1.jpg"},"status":"Stored"},{"filename":"diploma2.jpg","handle":"kOejeHySTSG0TuSJWWlh","mimetype":"image/jpeg","originalPath":"diploma2.jpg","size":31072,"source":"local_file_system","url":"https://cdn.filestackcontent.com/kOejeHySTSG0TuSJWWlh","originalFile":{"customName":"diploma2.jpg"},"status":"Stored"}],"filesFailed":[]}
However, the alert does not display any result as expected. I would like the alert to show results in the format below:
diploma1.jpg : https://cdn.filestackcontent.com/1e3CkeZQaeokzS9TpcJM : image/jpeg
diploma2.jpg : https://cdn.filestackcontent.com/kOejeHySTSG0TuSJWWlh : image/jpeg
I could use some assistance.