I’m trying to save a file, either to TIF or JPG. I went through few threads on this board trying to piece the code together, but can’t get it to work. Can you look at the following code and tell me what I need to change. When I run it I get the folder picker dialog, select folder, but no file gets saved. Debugger doesn’t show any errors.
const persistentFolder = await fs.getFolder();
const newFile = await persistentFolder.createFile("newfile.tif", {overwrite: true});
const saveFile = await fs.createSessionToken(newFile);
const result = await batchPlay(
[
{
"_obj": "save",
"as":
{
"_obj": "TIFF",
"byteOrder":
{
"_enum": "platform",
"_value": "IBMPC"
},
"layerCompression":
{
"_enum": "encoding",
"_value": "RLE"
}
},
"in": {
"_path": saveFile,
"_kind": "local"
}
}
]
);