Copy link to clipboard
Copied
I have a client that would like to pull images down from static weblinks (Amazon S3) to link in an InDesign document? Is there any way to do that natively in ES, or would I need to set up some kind of external script and execute the .jsx through that? Thanks.
Copy link to clipboard
Copied
Hi Brian,
Not much is available natively in Extendscript for making http calls except a socket object. However Kris did implement something over the socket object that might be useful for you. Have a look at the following link
Apart from this you could use the native Os capabilities using VBScript or Applescript, if you are familiar with C++ then you could even write a library that can expose methods directly accessible to Extendscript.
-Manan
Copy link to clipboard
Copied
If the links are available on http (rather than https) it is possible to do this with InDesign-scripting's Socket object.
I have a proof-of-concept script that imports webpages and images into InDesign using just the Socket object here: https://www.id-extras.com/html-import-script/
Ariel
Copy link to clipboard
Copied
Hi Ariel,
Kris seems to have a working sample to handle https calls as well, check the link i shared.
-Manan
Copy link to clipboard
Copied
indesign server support?
Copy link to clipboard
Copied
Hi Brian,
there should be some working code samples with AppleScript and VB Script that is called by ExtendScript using curl to fetch and download an image from an URL using http or https. What's not possible is to directly link a placed image to a source on the web. You always have to download and place the image. Even if temporarily and you like to embed the image on the page. No good idea, I think.
To make a workflow out of this, a process that "constantly" is looking for updates or to a folder on a web server to load all placeable images is a different question. Something I cannot answer.
Regards,
Uwe Laubender
( ACP )