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

Enable choosing Directory in file uploader #291

Open
joshuef opened this issue Aug 10, 2018 · 6 comments
Open

Enable choosing Directory in file uploader #291

joshuef opened this issue Aug 10, 2018 · 6 comments

Comments

@joshuef
Copy link
Collaborator

joshuef commented Aug 10, 2018

Using an input like so:
<input type="file" webkitdirectory directory multiple>

When choosing a directory, Peruse only shows the directory name in FileList:
peruse_directory_input
peruse_file_list

Whereas if I open the same running web app in Google Chrome, I see the expected output:
google_chrome_directory_input
google_chrome_file_list

@joshuef joshuef added the bug label Aug 10, 2018
@joshuef
Copy link
Collaborator Author

joshuef commented Aug 15, 2018

This is an electron bug. Tracked here: electron/electron#749

@joshuef
Copy link
Collaborator Author

joshuef commented Aug 15, 2018

As it's blocked. I'd opt to remove from this project.

@bochaco thoughts?

@bochaco
Copy link
Contributor

bochaco commented Aug 15, 2018

yes, I guess we shouldn't include it in our project for now since its resolution date doesn't depend on us.

@hunterlester
Copy link
Contributor

@bochaco @joshuef
Right, not needed for the upcoming release.
This is an unfortunate issue because it prevents us from making web hosting manager into a web app.
I tried a work around using dialog.showOpenDialog(mainWindow, { properties: ['openDirectory'] }) to no avail.

@hunterlester
Copy link
Contributor

hunterlester commented Oct 18, 2018

Providing further evidence for the non viability of a workaround:
It's possible to implement in Electron with a static webview: https://github.com/hunterlester/safe-app-base/compare/electron-poc

However, the workaround doesn't function for dynamic webview contents and even makes webviews buggy: master...hunterlester:dir-example

@Sash1ok1
Copy link

Can you point to a file in electronjs, in which the file or directory is selected? I need to rebuild the electron in order for webkitdirectory to work in both Chrome and NW.js. Recursively get FileList, in name the name of the file, in webkitRelativePath the relative path to the file from the selected directory

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

4 participants