You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Basically, I read the uploaded image file as Uint8Array bytes and write it to AppLocalData. But this throws an error which says Uncaught forbidden path.
I added this to main.json in capabalities: ... "fs:default", { "identifier": "fs:allow-exists", "allow": [{ "path": "$APPDATA/*" }] }
I also have this set up in tauri.conf.json: "assetProtocol": { "enable": true, "scope": { "allow": ["$APPDATA/**", "$RESOURCE/**", "$DOCUMENT/**"], "deny": ["$APPDATA/db/*.stronghold"] } }
I am open to any better way to save the image file. Thank you all in advanced
The text was updated successfully, but these errors were encountered:
I am trying to save an image to disk and after trying several options, this is the closest I have gotten:
const uploadedFile = await writeFile(
original_image.${extension}, bytes, { baseDir: BaseDirectory.AppLocalData, });
Basically, I read the uploaded image file as Uint8Array bytes and write it to AppLocalData. But this throws an error which says Uncaught forbidden path.
I added this to main.json in capabalities:
... "fs:default", { "identifier": "fs:allow-exists", "allow": [{ "path": "$APPDATA/*" }] }
I also have this set up in tauri.conf.json:
"assetProtocol": { "enable": true, "scope": { "allow": ["$APPDATA/**", "$RESOURCE/**", "$DOCUMENT/**"], "deny": ["$APPDATA/db/*.stronghold"] } }
I am open to any better way to save the image file. Thank you all in advanced
The text was updated successfully, but these errors were encountered: