I am wanting users to be able to download and import their save data to their computers from the web build of the tool im creating. The file is in JSON format using this code to save:
func SaveDataJSON(data: Dictionary, fileName: String) -> void:
var file := FileAccess.open(FILE_PATH + fileName + FILE_TYPE_JSON, FileAccess.WRITE)
if file:
file.store_string(JSON.stringify(data, "\t"))
file.close()
else:
push_error("Failed to save")
I understand at the basic is should use JavaScriptBridge, and download buffer. The only information ive seen is showing how to convert images and strings to the buffer, so im unsure what to really do for json or dictionaries.