+1 vote

I have a project which is usually running on a desktop. One of the first steps is to manually select a file using a FileDialog node.

Just out of curiosity I exported my project for web. I run it using a local web server (using python -m http.server). When I open the FileDialog, the path /home/web_user is the root folder.

Where can I find this path on my local file system? Or is this just some virtual file system from my browser? I tried it with Firefox and Chrome and got the same result.

For my project to work I have to be able to select a config file, so I need a way to put files into this path (manually).

in Engine by (111 points)

1 Answer

0 votes

AFAIK browsers store websites' data in a local database. This data is not accessible through file system.

A simplest solution that I implemented for the similar problem is to show user a TextEdit control and ask to copy-paste text (or JSON data) here and parse it afterwards.

More complex variant is to have an independent HTML control which would load a file and store it on a server. Then you can request it with HTTPRequest from Godot.

by (122 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.