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

Howto create a new document with downloaded file without writing to disk.

Community Beginner ,
Jan 30, 2017 Jan 30, 2017

Copy link to clipboard

Copied

I was able to do the following:

  1. Use XMLHttpRequest to download a file from a server as a blob
  2. Convert blob to base64
  3. Write base64 content to disk with window.cep.fs.writeFile(filename, base64FileContents, window.cep.encoding.Base64);
  4. Call jsx to open new file from disk in photoshop

My question: Is it  possible to open downloaded file in photoshop without writing to disk first? For example:

  1. Use XMLHttpRequest to download a file from a server as a blob
  2. Call jsx to open new document with received blob without writing to disk first
  3. User can save new file to disk from photoshop if he wishes

Thanks in advance

TOPICS
Actions and scripting

Views

449

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
Adobe
Enthusiast ,
Jan 30, 2017 Jan 30, 2017

Copy link to clipboard

Copied

I would try to look in Library panel code. You can drag smart object content into document quite easy and smoothly (hold "alt" for SO content). Smart object should be located in cloud. But maybe it's cached.

Votes

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
Community Beginner ,
Jan 31, 2017 Jan 31, 2017

Copy link to clipboard

Copied

LATEST

Thanks.

I took a look at the Library panel code. There is a lot of minimized js code so it's difficult to follow but I noticed that when I edit a cloud object, a local copy is created (on windows) in c:\users\myuser\AppData\Local\Temp then opened in photoshop

I guess that it is not possible to do (open downloaded file without writing to local disk first). I did not find any example or any mention that it is possible on the web. But I'm not an expert so any confirmation that this is possible or not would be appreciated.

Thanks for your help.

Votes

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