Save File implemented.

This commit is contained in:
2024-01-01 03:49:37 -06:00
parent dd2146ebda
commit 5e5e8f5656
26 changed files with 1929 additions and 7 deletions
+1 -1
View File
@@ -7204,7 +7204,7 @@ namespace olc
emscripten_fetch_attr_t attr;
emscripten_fetch_attr_init(&attr);
strcpy(attr.requestMethod, "GET");
attr.attributes=EMSCRIPTEN_FETCH_LOAD_TO_MEMORY|EMSCRIPTEN_FETCH_SYNCHRONOUS;
attr.attributes=EMSCRIPTEN_FETCH_LOAD_TO_MEMORY|EMSCRIPTEN_FETCH_SYNCHRONOUS|EMSCRIPTEN_FETCH_REPLACE;
emscripten_fetch_t*fetch=emscripten_fetch(&attr,std::string(url).c_str()); // Blocks here until the operation is complete.
if(fetch->status==200){
printf("Finished downloading %llu bytes from URL %s.\n", fetch->numBytes, fetch->url);