Correct URL to download images via API
Sperend
Registered Users Posts: 10 Big grins
I am working on a program where I need to display thumbs. If I want to download an image thumb via a ThumbURL (provided with smugmug.images.getURLs). But this is not possible.
What is the URL I must use to download (password protected) images? I have a sessionID, username, password, etc. Or is there an API command that I overlooked to download an image? (I am programming in Java, using the Kallasoft java API)
Help is very much appreciated.
What is the URL I must use to download (password protected) images? I have a sessionID, username, password, etc. Or is there an API command that I overlooked to download an image? (I am programming in Java, using the Kallasoft java API)
Help is very much appreciated.
0
Comments
Be sure to set the URL's cookie before downloading the image.
First obtain the java.net.URL of the thumbnail. The look at the code-snippet from my own SmugFig API below for more info about setting the cookie:
The call to getSessionID() returns the string that is the session-id returned to you when you log-in into Smugmug using the API.
After calling openInputStream(URL), you can use the returned input-stream to read the thumbnail's contents.
When I hear the earth will melt into the sun,
in two billion years,
all I can think is:
"Will that be on a Monday?"
==========================
http://www.streetsofboston.com
http://blog.antonspaans.com
Bedankt!