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

perhaps maybe to restrictive? #364

Open
jimmywarting opened this issue Mar 9, 2022 · 0 comments
Open

perhaps maybe to restrictive? #364

jimmywarting opened this issue Mar 9, 2022 · 0 comments

Comments

@jimmywarting
Copy link

I find the directory picker to be maybe to picky on what i can and can't choose b/c it can contain executable or system files?

Maybe instead of flat out restricting me to pick any folder i want how about instead allowing showDirectoryPicker to succeed on mostly anything and instead make the read, write, requestPermission access on that handle to throw instead? it would be like creating some opaque handle that you would not be able to do much with it.

In that case maybe you can at least go into some some of the directory or read some of the file or allowing anyone do save multiple files in a newly created directory, it feels quite silly that i can't select the nearly empty download folder to save multiple files which i can't select, But i can select my hole git folder where i have a buch of bad voodoo stuff that can execute a bunch of things, like what gives?

if i could pick the download folder (that i'm not able to select for some unknown reason) an i get a directory handle, then if i create a new folder within that directory and do: downloadDirHandle.getDirectoryHandle('status-report-${Date.now()}', { create: true }) then surly that newly created folder should at least be safe to read and write files to?


Some years ago I create a daisydisk like application entirely built in the web that won't require you to download any application (thanks to drag and drop to asynchronous read the content the chosen directory that you picked)

here is a demo of it: https://jimmywarting.github.io/diezyweb/ and the source too
At least this dose not require any read or write access, All it really needs is some metadata about file size, that's all...

i think it's mostly thanks to entry.getMetadata() that whatwg/fs is missing. I would like revive/modernize this and do something more useful with this now that we have the whatwg/fs but i think the old api still beats this new whatwg/fs in terms of easy access and speed, i don't think promises and filehandle.getFile() would make it any faster cuz it has to do more logic with it. i bet the older api with drag and drop still beats the new fs api

I mean i can drag and drop almost any folder i want into the browser but i can't select it with show showDirectoryPicker - that is a bit odd... i can even drop the hole user directory if i want...

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

No branches or pull requests

1 participant