-
hey, is there any way I can use In electron it works after I do this protocol.registerFileProtocol('file', (request, callback) => {
const pathname = decodeURI(request.url.replace('file:///', ''));
callback(pathname);
}); I have a external config file where the user defines a local path and I need to show the pics inside, etc this is one of the few reasons I'm still stuck with electron and I can't wait to migrate 😃 thank you |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 17 replies
-
Up, same problem. I would like to change the source of a videoPlayer and end up with this error/limitation. Thank you EDITWe should also mention that we need to add the :asset protocole in the csp for this to work normally. I find the way to use local file, you need to get the link from the api like that :
have fun o/ |
Beta Was this translation helpful? Give feedback.
Up, same problem.
I would like to change the source of a videoPlayer and end up with this error/limitation.
Any solution or documentation to load local file ?
Thank you
EDIT
We should also mention that we need to add the :asset protocole in the csp for this to work normally.
in the file tauri.conf.json add in the csp key "asset:"
I find the way to use local file, you need to get the link from the api like that :
source : Doc Tauri