• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers

P: Jsx can't save document to path containing 'cloud-content'

2 Votes
Explorer ,
Nov 13, 2019 Nov 13, 2019

Copy link to clipboard

Copied

Adobe Photoshop version: 21.0.1 20191106.r.47 2019/11/06: 3152b481f18  x64
OS: Windows 10 64-бит
OS version: 10 or more 10.0.18362.329

sample jsx code

app.documents.add(100,100);
app.activeDocument.saveAs(new File( "C:\\cloud-content1\\asd.psd"));

The folder C:\cloud-content1\ exists and it's allowed to write in this folder.

Expected result: file saved to the specified path
Actual result: error, approximate translation of message is:
Can't save as "/cloud-countent1/asd.psd": file not found.

The same error occurs for many variations of the file path, such as C:\\cloud-content\\asd.psd", C:\\cloud-contentasdf\\asd.psd" and so on.


When saving manually from the Photoshop UI - works fine.

Bug Fixed
TOPICS
macOS , Windows

Views

51

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Employee , Jan 31, 2022 Jan 31, 2022

Fixed in 21.0.2 or later

Status Fixed

Votes

Translate

Translate
13 Comments
Explorer ,
Nov 13, 2019 Nov 13, 2019

Copy link to clipboard

Copied

Another strange result here. Change code as follows (just remove psd extension from the path)

app.documents.add(100,100);
app.activeDocument.saveAs(new File( "C:\\cloud-content1\\asd"));
then the file will be saved, but not in C:\cloud-content1 folder, but to the following path
C:\Users\User\Documents\Adobe\Деловые партнеры Photoshop Cloud\asd

Votes

Translate

Translate

Report

Report
Adobe Employee ,
Nov 13, 2019 Nov 13, 2019

Copy link to clipboard

Copied

Take out the "1" it should be "cloud-content"

Votes

Translate

Translate

Report

Report
Explorer ,
Nov 13, 2019 Nov 13, 2019

Copy link to clipboard

Copied

No, it also will not work with path like C:\cloud-content\asd.psd with the same error. As I can see from my tests, any path which starts with <any drive letter>:\cloud-content<any suffix>\any\other\path.psd will cause the same error.

Wherein the paths where 'cloud-content' part is not on the top, e.g. C:\test\cloud-content\asd.psd work as expected.

Votes

Translate

Translate

Report

Report
Adobe Employee ,
Nov 13, 2019 Nov 13, 2019

Copy link to clipboard

Copied

Yes. I have the same problem. Let me look into it. Try this routine in the meantime:
function SaveInCloud( inFile ) {
    var idsave = stringIDToTypeID( "save" );
    var desc391 = new ActionDescriptor();
    var idas = stringIDToTypeID( "as" );
    var desc392 = new ActionDescriptor();
    var idcloudPSDFormat = stringIDToTypeID( "cloudPSDFormat" );
    desc391.putObject( idas, idcloudPSDFormat, desc392 );
    var idin = stringIDToTypeID( "in" );
    desc391.putPath( idin, inFile );
    executeAction( idsave, desc391, DialogModes.NO );
}


Votes

Translate

Translate

Report

Report
Explorer ,
Nov 14, 2019 Nov 14, 2019

Copy link to clipboard

Copied

Yes, this AM code works fine and saves in cloud. Thank you.
---
In additional to the original report: if I want to save *local* file in the path "C:\cloud-content\test.psd, it still fails. And I could not workaround this with AM code (with your code with removed idcloudPSDFormat, or with the code captured with script listener). It's a strange desire to save file to the such special local path, but who knows, may be this remark will be helpful for your debugging. 


Votes

Translate

Translate

Report

Report
Adobe Employee ,
Nov 14, 2019 Nov 14, 2019

Copy link to clipboard

Copied

You cannot save a cloud document, psdc, locally. They only go in the cloud. psd files and all others can not go in the cloud.

Votes

Translate

Translate

Report

Report
Community Expert ,
Nov 14, 2019 Nov 14, 2019

Copy link to clipboard

Copied

So how does a user backup cloud files?

Votes

Translate

Translate

Report

Report
Explorer ,
Nov 15, 2019 Nov 15, 2019

Copy link to clipboard

Copied

You cannot save a cloud document, psdc, locally
No, in the remark above I saying not about cloud psdc, but about simple local psd.

Steps
* create PSD
* try to it to to local disk C:\ in the local folder called "cloud-content", so the path (local path, no cloud) will be C:\cloud-content\test.psd. Yes, it is a little bit strange name for the local folder, but why not?

app.documents.add(100,100);
app.activeDocument.saveAs(new File( "C:\\cloud-content\\asd.psd"));
* this code will throw an error.

Just again - no cloud functionality here at all, just trying to save local file, but due to "magic words" in the path the operation fails.

I also can replase saveAs call with tha AM-code (also without referencing any cloud-specific entities such as "cloudPSDFormat") - and it also will fail.


So how does a user backup cloud files?
No problem with this. You can "Save as" cloud psdc file as local psd file via the Photoshop UI or via the jsx code with document.saveAs (but you should specify the target path which is not containing "magic" word "cloud-content".




Votes

Translate

Translate

Report

Report
Adobe Employee ,
Nov 15, 2019 Nov 15, 2019

Copy link to clipboard

Copied

Yes. I argued against this magic folder. But cloud-document at the root of any drive is not allowed for non psdc files.
Yes. I argued for that as well. "I want to save all my cloud docs locally. Let me iterate the cloud!" Hopefully, that will come soon!

Votes

Translate

Translate

Report

Report
Community Expert ,
Nov 15, 2019 Nov 15, 2019

Copy link to clipboard

Copied

But these files can be moved in the Finder/Explorer, correct?

Votes

Translate

Translate

Report

Report
Adobe Employee ,
Nov 15, 2019 Nov 15, 2019

Copy link to clipboard

Copied

@david? I'm not sure what you mean. I would NOT have a cloud-content (my mistake saying cloud-document above) folder at the root of any drive. There is a "local cloud" folder if you look at app.cloudWorkAreaDirectory. This is to store files locally that cannot be stored in the cloud. There is also a per document activeDocument.cloudWorkAreaDirectory (a place to put side car files for this document) and activeDocument.cloudDocument (tells you this document is in the cloud)

Votes

Translate

Translate

Report

Report
Community Expert ,
Nov 15, 2019 Nov 15, 2019

Copy link to clipboard

Copied

Yeah this folder should be in userland. What I'm getting at is that cloud sync folders can be problematic. We see people wanting to work directly in a dropbox folder and then having problems, for example.

Votes

Translate

Translate

Report

Report
Adobe Employee ,
Jan 31, 2022 Jan 31, 2022

Copy link to clipboard

Copied

LATEST

Fixed in 21.0.2 or later


Senior Product Manager - Customer Advocacy - Digital Imaging
Status Fixed

Votes

Translate

Translate

Report

Report