Rodolphe Rodolphe - 1 year ago 82
Javascript Question

How to download an image from url to use in Photoshop scripting (ExtendScript Toolkit)

In my Photoshop javascript (using ExtendScript toolkit), I need to download an image before processing it. I'm trying with wget, as such:

app.system("wget https://dl.dropboxusercontent.com/u/73950/IMG_1827%20%282%29.png > ~/Desktop/test.png");


Unfortunately, this produces an empty png file.

What's the correct way to download files from url when scripting with Photoshop?

Answer Source

Tried your wget command without luck. But it worked with curl for me.

app.system("curl -o ~/Desktop/test.png https://dl.dropboxusercontent.com/u/73950/IMG_1827%20%282%29.png")