Trying to open a .psd file using URL

,
const fs = require('uxp').storage.localFileSystem;
    try {
      const file = await fs.getEntryWithUrl(imagesLocalFile);
      console.log(file.isFile);
    } catch (error) {
      console.log("error: " + error.message);
    }

This is my imagesLocalFile = “file://C:\imagesforuxp\73208511_o_1_1.psd”

But this its always return this error: “Could not find an entry of ‘file:///C:/imagesforuxp/73208511_o_1_1.psd’”

Perhaps this thread is of help?

1 Like

image
Im seeing you said this. So what should i set it to? And why 4 not working?

You want to set it to version: 5 to use the fs module. It’s not so much that 4 isn’t working, more that it was superceded by 5 and this doesn’t support some never UXP APIs.

1 Like

Thank you work out perfectly

1 Like