ember-file-upload
ember-file-upload copied to clipboard
Investigate folder uploads
This looks abandoned; it may be worthwhile to investigate briefly.
There are two non-standard APIs that allow directory uploads. Both are controlled by properties on <input type="file">
:
-
allowdirs
-
webkitdirectory
I'm tending toward not adding official support before one of them (or a third option) has been standardized.
It looks like those attributes are for controlling whether directories can be submitted as input; not setting them does not prevent directories from being submitted. I came across this looking into a downstream bug (https://github.com/mnutt/davros/issues/140) where trying to drag & drop a directory just results in uploading an empty, regular file.
It seems like this could be implemented using the webkitrelativepath
property on the File
object, which is also non-standard, but it is very widely supported: https://caniuse.com/mdn-api_file_webkitrelativepath; I would argue it doesn't make sense to wait on the standards bodies for this.
Thanks for your input @zenhack. Would you be interested in preparing a PR?
I think I'm unlikely to find time to work on it myself at least in the short to medium term. And I'm probably the wrong person for the job -- I've never even used ember myself; my interest is as an end-user of said downstream app.
this react plugin can upload a folder recursively : https://github.com/rpldy/react-uploady/tree/master/packages/ui/upload-drop-zone