Saving a JPG to a selected folder

Hi, thanks for replying :slight_smile: Images simply will not save out to a user-selected folder. What is the right way to approach this? UXP or batchplay?

My latest endeavour has been the following to no avail:

await userFolder.createFile(fileName + ".jpg").then(async result => {
            console.log("*** Path: " + result.nativePath);
            await fs.createSessionToken(result).then(async token => {
                document.save(token);
            });
    });

and:

await fs.getFileForSaving(fileName + ".jpg").then(async entry => {
    console.log("*** Path: " + result.nativePath);
    await fs.createSessionToken(entry).then(async token => {
        document.save(token);
    });
});