Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate folder uploads #2

Open
tim-evans opened this issue Apr 5, 2016 · 5 comments
Open

Investigate folder uploads #2

tim-evans opened this issue Apr 5, 2016 · 5 comments

Comments

@tim-evans
Copy link
Collaborator

This looks abandoned; it may be worthwhile to investigate briefly.

@jelhan
Copy link
Collaborator

jelhan commented Mar 14, 2020

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.

@zenhack
Copy link

zenhack commented Mar 29, 2022

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 (mnutt/davros#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.

@gilest
Copy link
Collaborator

gilest commented Mar 30, 2022

Thanks for your input @zenhack. Would you be interested in preparing a PR?

@zenhack
Copy link

zenhack commented Apr 2, 2022

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.

@oliverlj
Copy link

this react plugin can upload a folder recursively :
https://github.com/rpldy/react-uploady/tree/master/packages/ui/upload-drop-zone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants