Hello Everyone!
I am currently developing a file chooser component for the UXP plugin. However, I have encountered an issue when using the following HTML tag:
To open file you need to use the following code:
const localFileSystem = require(‘uxp’).storage.localFileSystem;
await localFileSystem.getFileForOpening({allowMultiple: true/false, types: [“png”, “jpg”]});
Documentation: getFileForOpening
Hi Liryk,
Thank you for the prompt response.
If I used the getFileForOpening functionality, I would get a different type of file system object, like the screenshot below.
UXP doesn’t support <input type=file> as documented here. As @Liryk has responded earlier, getFileForOpening is the recommended approach to show file pickers from a UXP panel. Since UXP doesn’t support File, it won’t be helpful to try to obtain it in a UXP panel context.