Tauri + Leptos: Display image directly from disk #10146
-
Hi, I found some solutions on the Internet:
But all of them use some JS framework/library (React, Vue) for the frontend. And they have the So, my question is the following: How can I load an image from a disk? UPD: I searched for the tauri/core/tauri/scripts/core.js Lines 12 to 19 in 5878fb4 I did the same in my project and got the following error: ![]() Can someone give me a hint on how can I fix it? And yes, I've edited my tauri.conf.json :
"security": {
"csp": "default-src 'self'; img-src 'self' asset: http://asset.localhost"
}, and : "protocol": {
"asset": true,
"assetScope": [
"$APPCACHE/**",
"$RESOURCE/**"
]
}, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Nevermind. I'm kinda stupid. The 🥲 🤪 😶🌫️ |
Beta Was this translation helpful? Give feedback.
Nevermind. I'm kinda stupid. The
C:\Users\pavlo.myroniuk\AppData\Roaming\com.tbt.totes\
folder is$APPDATA
but not$APPCACHE
or$RESOURCE
. I changedtauri.conf.json
and now it works.🥲 🤪 😶🌫️