-
-
Notifications
You must be signed in to change notification settings - Fork 21k
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
Allow downloading files from the virtual file systems of HTML games #27992
Comments
Maybe this will be possible when Godot will be available on HTML5 as it was previously with godot.online |
Feature and improvement proposals for the Godot Engine are now being discussed and reviewed in a dedicated Godot Improvement Proposals (GIP) (godotengine/godot-proposals) issue tracker. The GIP tracker has a detailed issue template designed so that proposals include all the relevant information to start a productive discussion and help the community assess the validity of the proposal for the engine. The main (godotengine/godot) tracker is now solely dedicated to bug reports and Pull Requests, enabling contributors to have a better focus on bug fixing work. Therefore, we are now closing all older feature proposals on the main issue tracker. If you are interested in this feature proposal, please open a new proposal on the GIP tracker following the given issue template (after checking that it doesn't exist already). Be sure to reference this closed issue if it includes any relevant discussion (which you are also encouraged to summarize in the new proposal). Thanks in advance! |
Has this been archived? How can I keep track of the development going on? |
By creating a new feature request at https://github.com/godotengine/godot-proposals |
Downloading files from the virtual system in HTML5 is already implemented in Godot 3.4 with #48929 ( |
1. Version: Accessing buffer directly from Image class
2. Version: Accessing buffer from File class, as mentioned above by Calinou
|
Godot version: 3.1
OS/device including version: Windows 10
Issue description:
I would like to make an HTML application that allows the user to move images around to build a map and then download the map as a png image.
This issue is about the downloading part.
For a native application, I would have godot make the map image, and then use the save_png function of the Image class to save it to the user's disk.
But on HTML, Godot does not have access to the user's file system (for good security reasons), so
save_png
saves the image to some sort of virtual file system instead (see picture). From there, I would like to be able to have the browser open a download dialog for this file, but I have not found a way to do this in the Godot documentation.So feature request: a way to tell the browser running an HTML game to open a download dialog for a file present in the virtual file system godot html games have access to.
Related issue: #18947
In this issue, someone suggests using
JavaScript.eval()
. I tried a few things but the issue is that Javascript does not have access to the game's virtual file system where the png is.Minimal reproduction project:
HtmlDownloadPng.zip
The text was updated successfully, but these errors were encountered: