Problems replacing image

cschubertcschubert Registered Users Posts: 3 Beginner grinner
Hello,

I'm writing a small script to upload and (possibly) replace images to smugmug. Uploading works fine, but when I try to replace an image I always get at an "invalid image id" response:

{"stat":"fail","method":"smugmug.images.replace","code":5,"message":"system error (invalid image id)"}

Here is the command I use for uploading:

curl "http://upload.smugmug.com/photos/xmlrawadd.mg" -H "Content-MD5: 3fe9a8311a5d716b629964d533a291ce" -H "X-Smug-SessionID: **some session id**" -H "X-Smug-ResponseType: JSON" -H "X-Smug-Version: 1.1.2" -T "**path to my file**" -H "X-Smug-ImageID: 1205357571"

The same problem arises then I use HTTP PUT. I tried to add the Content-Length and/or X-Smug-AlbumID headers, but non works. As I said before, uploading works fine, and the image ID is a valid Id of one of my images.

Any help is appreciated!
Thanks, Christoph
Sign In or Register to comment.