Support Range headers for standard bundled assets? #7870
-
I'm using tauri with a Vite project that will have some large tif data bundled with it in the public dir. I'd like when attempting to load this local data that it respects any Range header set to be able to partially load the data. Is there a way to do this in a general case? I've seen the streaming example (https://github.com/tauri-apps/tauri/blob/dev/examples/streaming/main.rs) but I'm not sure how that would apply in my case. I don't need streaming specifically. More a general handling of the Range header when setting Thanks for any pointers here! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
The built-in |
Beta Was this translation helpful? Give feedback.
-
Ah I'm new to tauri and was unaware about the asset protocol. Switching to using the asset protocol works perfectly for my use-case. Thank you! |
Beta Was this translation helpful? Give feedback.
The built-in
asset://
protocol also supports this (it's basically the same as the streaming example) but that's really only for files present on the user's drive. You could modify the streaming protocol to serve the bundled binary assets until the tauri;// protocol supports it. Speaking of which, please feel free to open a feature request for this :)