You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, what's returned when uploading multiple files isn't actually a fileInfo object. Instead, what's returned is a truncated object sort of based on what would be returned for single file uploads.
What would be useful, so that users don't have to separately retrieve the individual objects in order to do things like show a more robust preview option in javascript, is to return an array of fileInfo objects for each of the files in the group. I suspect it's trivial to do this inside the react library itself as the network call to /group already returns this info.
The text was updated successfully, but these errors were encountered:
Hi @thongly, thanks for the suggestion! Using the Dialog API, you can get an array of file objects from the widget and then get information about each object. Here's how you can do this
<WidgetpublicKey="demopublickey"onDialogOpen={(dialog)=>{// fires when a user closes the widget's dialog (clicks Done)dialog.done(async(group)=>{// get an array of file instances and fileInfo objectsconstfileInfos=awaitPromise.all(group.files());console.log(fileInfos);});}}multiple/>
We'll definitely consider simplifying this in the new uploader we're working on.
Currently, what's returned when uploading multiple files isn't actually a fileInfo object. Instead, what's returned is a truncated object sort of based on what would be returned for single file uploads.
What would be useful, so that users don't have to separately retrieve the individual objects in order to do things like show a more robust preview option in javascript, is to return an array of fileInfo objects for each of the files in the group. I suspect it's trivial to do this inside the react library itself as the network call to
/group
already returns this info.The text was updated successfully, but these errors were encountered: