Tutorial "Writing a file with UXP" file picker not loading

I’m just getting started with UXP for Photoshop, and I’m going through the tutorials.

The javascript in this tutorial:

stops execution at this line without loading the file picker:
const file = await storage.localFileSystem.getFileForSaving(“layers.tsv”);

storage is defined here:
const storage = window.require(“uxp”).storage;

What am I missing?

Thanks!

It turns out the tutorial fails to mention that the code provided in the tutorial requires these lines in the manifest.json file:
“requiredPermissions”: {
“clipboard”: “readAndWrite”,
“localFileSystem”: “fullAccess”
},

The template included with Adobe UXP Developer Tools and recommended by the tutorial also fails to include these lines.

And this requirement is not mentioned in the documents that define the require(‘uxp’).storage.localFileSystem methods here:
https://developer.adobe.com/photoshop/uxp/2022/uxp-api/reference-js/Modules/uxp/Persistent%20File%20Storage/FileSystemProvider/

1 Like