This is my code. But it working with file picker dialog.
I don’t want open dialog. is there any solution?
const desktopDomain = storage.domains.userDesktop;
const folder = await fs.getFolder({ initialDomain: desktopDomain });
const designImg = await folder.getEntry(`${imgPath}`);
Sujai
2
You can use FS api’s listed in the UXP documentation.This is based on Node.js style File System API.
You can also get an Entry object from a File path/ URL using getEntrywithURL
Hope this helps!
1 Like
it’s not working with this error
Error: Could not find an entry of 'file:<path>'
how can i fix it ?
Check you’ve entered the correct path?
Sujai
5
you will need manifest version 5 and the correct permissions. Do refer to this thread - getEntryWithUrl not accepting valid path - #3 by Timothy_Bennett
Maher
6
check the requirements posted by other memebers and always start the path with file:/
or file:\\