Skip to content

How can I get the list of selected files from an UploadButton? #445

Answered by yoavniran
A-Baji asked this question in Q&A
Discussion options

You must be logged in to vote

@A-Baji The html-dir-content library isnt used by the upload-button package. There's usually no need for that.
Notice that when you use the webkitdirectory flag for the file input element, you do get the webkitRelativePath property in all browsers (at least chrome & firefox) per the spec.

You can get the list of files in various ways using Uploady's API.
One way is the file filter method
Another can be the useBatchAddListener hook, and then inspecting the batch.items array.

Hopefully this helps.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@A-Baji
Comment options

@A-Baji
Comment options

Answer selected by A-Baji
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants