-
Notifications
You must be signed in to change notification settings - Fork 66
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
Can't open downloads folder due to containing "system files" #381
Comments
I have been in the same boat I have also found it to be quite annoying and unnecessary restrictive.
if that is the case then it should say so...! not b/c it contains system files (which it dose not do) anyway there is a round about way to select a folder \w drag and drop files into the browser and it dose not have the same limitation, then you could use |
https://developer.mozilla.org/en-US/docs/Web/API/DataTransferItem/getAsFileSystemHandle |
I would like to reopen this issue. I feel like the drag and drop workaround can be counter intuitive in some cases. Since the folder can be accessed with the drag and drop API, I think this API should allow it as well.
Thanks (: |
This comment was marked as resolved.
This comment was marked as resolved.
I filed https://bugs.chromium.org/p/chromium/issues/detail?id=1405817 for the misleading error message, as it is a browser bug, not an issue in the specification. |
Simply put: To save files & folders... not to necessary read the content of it. isn't it weird that you can have read or read/write access but not just write access as a mean to just download multiple files and folders? you could maybe perhaps build some kind of ccleaner or daisydisk to figure out what takes space. so they often require a lot of read access |
Write-only access is probably trickier because of the risk of collisions. What should happen if you want to save a file that already exists? Should it be automatically renamed to something else? (in that case you can basically already do batch downloads with existing mechanisms). Should it silently replace existing files? That feels weird and a potential security risk. A lot of people are very much used to the workflow:
In the current state of the spec, allowing access to the Downloads folder would make it very easy for a malicious webpage to pretend that you are about to download a file, but they suddenly can read all your downloads, your latest bank statements, your upcoming flight tickets, your identity documents that you scanned and downloaded from your email, and so on. On the other hand, requiring drag and drop for accessing such "sensitive" directories is pretty reasonable, as dragging and dropping your whole Downloads folder into a webpage is a pretty weird thing to do by accident. |
@guillaumebrunerie Simply put, that's up to the user to decide. The user agent should follow the user's intention. We don't need to enumerate use cases to justify that the user should be in control of their data and how it's used. The user agent can certainly have guardrails, but those guardrails are to ensure user intention, not to prevent them from doing something. |
When saving, the user can choose where to save and what to name the file. Perhaps that name is simply what to name the directory in which the application can write into. |
The alternative is that people having to make native apps which allow access to far more than a downloads folder, while also being a poor user experience that limits platform choice. Please consider this framing.
Accidental dragging/dropping happens regularly. In fact, it happens to me with dirty touch screens, interference with wireless mice, and with finger control problems due to hand injury. |
Giving Read access to the download folder can be used to verify if some files have already been downloaded into a floder. I`ve never experienced any download that asked to drag and drop a folder to set the download location. This is poor UX imo. If we still dont want to allow read/write access to the download folder. |
That's my point exactly, so that's why the API does allow access to the whole Downloads folder when dragging and dropping, because it doesn’t feel like you are setting a download location. Such a UX would make a bit more sense for a disk analyzer app for instance.
Yes, this already works in Chrome and is explicitly mentioned in the spec as a safe way to use this API to download many files without having to give read access to sensitive folders. |
"hey user, you must run chrome with disabled security check flags turned on." if user really REALLY want do select the download, home, cookie folder or anything to be selected and they are sure about what they are really getting them self into with proper prompt notification, then let them?
I know there is a risk of user selecting more than what they realize, there are both pro and conn to each side. and user will keep asking tech support why they can't pick folder xyz or how to get around it. i probably now also realize that chrome is not ever going to allow those folder b/c of security risk. the only thing i can hope for now is that you can mitigate some of the concerns some developers have about being able to download files. I also belive something like a but you would be able to suggest your own name and location and you would get read & write access to that newly created folder without the need of any additional prompts for the browser session. const dirHandle = await showSaveDirectoryPicker({ suggestedDirectoryName: 'photopea' }) instead of asking to pick a folder to save things in you would instead ask the user to create a new folder in which you would get allowed read & write access to that newly created folder. or if you could perhaps be able to just simply be able to download a list of file/directory handles globalThis.download([
directoryHandle,
fileHandle,
fileHandle2
]) this will only deal with saving stuff but not reading... |
@jimmywarting The CL that introduced this drag and drop change was quickly reverted. I have deleted my previous comments. |
On Chrome, I can't even open my Downloads folder so that an app can save several files at once, because it allegedly contains "system files". (It doesn't.) This is due to section 6.1:
This specification is far too conservative in what it allows users to do on their own computers, and with their own data. By all means, users should be informed of dangers, but the user agent cannot truly know the intent of the user, nor the application they're using. The user agent should work on behalf of the user, not block them for reasons that often do not apply.
I propose that all items listed in section 6.1 be allowed, following a warning message and confirmation by the user.
The text was updated successfully, but these errors were encountered: