-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
HTML5 builds should allow users to access the filesystem on the host #1443
Comments
Duplicate of #1123.
It's low-priority, but we definitely plan to support native file dialogs sooner or later, especially as we have to use them for sandboxed mode on macOS. |
@Calinou (bolds added by me):
|
@umarcor I edited my post accordingly after reading comments in that thread 🙂 macOS sandboxed mode didn't exist back when reduz posted that comment (or we weren't aware of its existence). |
@Calinou, does marking this as a dup and archiving it imply that HTML5 builds will not be fixed until native dialogs are supported in all platforms? |
@umarcor We can edit the documentation, but that's all we can do for now. Note that in any case, anyone is free to open a pull request to fix bugs and improve documentation. You don't need to open a proposal for that. |
Describe the project you are working on:
This applies to any game/tool that allows users to load/save files. The project I'm working on is a diagram editor based on GraphEdit and GraphNode.
Describe the problem or limitation you are having in your project:
I want to allow users to load or save files. Currently, using FileDialog on Windows works as expected. However, HTML5 builds are executed in a sandbox (
/home/web_user
). Hence, users can save and load the files in the sandbox, but cannot export them to or import them from outside. As a result, the experience is very inconsistent.Describe the feature / enhancement and how it helps to overcome the problem or limitation:
I asked about it in the IRC, and I was told that the host file system cannot be accessed in browsers, due to a security constraint. However, I don't expect the game/tool to access the host file system directly and without authorization. I'm ok with having and using the sandbox for that. Instead, the interactions show be handled through FileDialog.
Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
In regular HTML sites, this is typically done through https://www.w3schools.com/tags/att_input_type_file.asp, which allows the user to select one or multiple files. Conversely, saving content in the file system is done by triggering a download. In both cases, the user browses the host file system explicitly.
If this enhancement will not be used often, can it be worked around with a few lines of script?:
I believe this is not an enhancement, but a currently broken (as in "not completely implemented") feature. It is an undocumented and inconsistent behaviour.
FTR, in Orama-Interactive/Pixelorama they work around it with Pukkah/HTML5-File-Exchange-for-Godot.
Is there a reason why this should be core and not an add-on in the asset library?:
Developers of Godot have stated that supporting native save/load dialogs is undesired. Providing a consistent UX for users of Godot games is preferred over providing consistency to users of games/tools along with other apps on the same host. See godotengine/godot#13177. Still, consistent Godot UX should not be at the expense of removing the most basic functionality. Should it be possible to use the Godot styled dialog, that'd be ok. Otherwise, I believe that the native dialog should be supported in HTML5 builds.
Note that this issue is similar to #1123. However, that is about using native dialogs on any platform; which would fix the HTML5 builds is a result. Conversely, this is about fixing HTML5, which might be done by using native dialogs or (hopefully) through other creative solutions.
The text was updated successfully, but these errors were encountered: