views:

95

answers:

4

Is that possible to upload an image from Photoshop (for example, an open image exported to jpeg) to some web place - REST service, FTP etc by using scripting features of Photoshop? For example - I have an image open in Photoshop and then execute some special script that sends an exported version of it to some place over the web. I saw something like this but it uses an automatically generated batch file that executes ftp command on Windows. I would like to use something more beautiful if it's possible. Or may be there are some info to know how to make a simple plugin for just this task. Thanks.

A: 

Hi,

The standard way to upload files to REST web service is: 1. Use POST with Content-Type: application/octet-stream including the image stream in the body. 2. Use the "SLUG" header when POSTing to supply the image file name.

I don't know what kind of API PhotoShop exposes, but I guess there is an API to read the image stream, So using this API you can prepare the required POST request and adding the image to your server :-)

Hope that I helped, Shay

Shay Tsadok
A: 

The API's within photoshop do not allow for network access. They just control photoshop and are limited to user actions you can do within Photoshop.

I would suggest using Automator or another external scripting language to post-process the output of photoshop.

Jess Bowers
A: 

If the Photoshop API doesn't support network access, you could try loading a Flash/Flex file from the script, and do then do the upload in the swf.

DavidKennard
A: 

Probably with JavaScript in photoshop:

http://www.adobe.com/devnet/bridge/pdfs/javascript_tools_guide_cs3.pdf

SoYeah