emscripten-core / emscripten-core/emscripten
EMSCRIPTEN_FETCH_NO_DOWNLOAD still attempts http get
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 105
Description
```
emscripten_fetch_attr_t attr;
emscripten_fetch_attr_init(&attr);
{
// what this does: fetch file from IndexedDB if exists
strcpy(attr.requestMethod, "GET");
attr.attributes =
EMSCRIPTEN_FETCH_LOAD_TO_MEMORY /* s.t. we get the actual bytes of data */ |
EMSCRIPTEN_FETCH_PERSIST_FILE /* from IndexedDB */ |
EMSCRIPTEN_FETCH_NO_DOWNLOAD /* prevent falling back to xhs get if not in IndexedDB */;
attr.userData = this;
attr.onsuccess = downloadSucceeded;
attr.onerror = downloadFailed;
}
```
Hi, I'm attempting the above, but it looks like this still attempts to fetch over the network if the file doesn't exist in IndexedDB
Contributor guide
Assessment
This issue has not been assessed yet.