Support http range requests for static assets like pmtiles (Protomaps) #12243
-
|
Hey, When setting up a minimal example like this one https://github.com/do-me/protomaps-example with tauri (e.g. running through the wizard with plain JS, no frontend framework, simply using the index.html and zurich.pmtiles file) I am getting this error:
Are range requests already supported or is there some kind of setting I could use to activate them? This would also benefit httpfs with DuckDB or other methods that rely on this function. I found #7870 pointing me to this reference in the docs: https://v1.tauri.app/v1/api/js/tauri/#functions. Would that be sufficient? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 19 replies
-
|
@bpevs had the same idea and got it working! https://github.com/inro-digital/tauri-offline-maps |
Beta Was this translation helpful? Give feedback.
-
|
I'm currently working on this! You can observe this behavior in the repository by @bpevs. (This Repository helped me a lot! )
After launching the Android Emulator and checking the logs via DevTools, I found that Range requests to pmtiles cause an error (this error does not occur on iOS).
The code that handles the tauri/crates/tauri/src/protocol/asset.rs Lines 29 to 33 in ddc4693 Does anyone know why Range requests fail on Android? |
Beta Was this translation helpful? Give feedback.
-
|
Hey, did you get the Range Requests working? Or did you avoid the issue? |
Beta Was this translation helpful? Give feedback.

I've submitted a PR!
As mentioned above, since I uses
tauri-plugin-uploadin PR, it avoids the filesystem issue originally raised in the issue.