Image ID overflow???
yanash
Registered Users Posts: 2 Beginner grinner
Hi Guys!
I get weird response when I upload an image to http://upload.smugmug.com/. It does look like you are using 32-bit integer at some point but image IDs ran out of the space.
Here is sample reply, notice that image ID in URL is fine, but the ID it self is negative:
<?xml version="1.0" encoding="utf-8"?><methodResponse><params><param><value><struct> <member><name>method</name><value><string>smugmug.images.upload</string></value></member><member><name>Image</name><value><struct><member><name>id</name><value><int>-2146731493</int></value></member><member><name>Key</name><value><string>2JCtpBT</string></value></member><member><name>URL</name><value><string>http://allseasons.smugmug.com/Catego...525767_LdRQQC#2148235803_2JCtpBT</string></value></member></struct></value></member></struct></value></param></params></methodResponse>
I get weird response when I upload an image to http://upload.smugmug.com/. It does look like you are using 32-bit integer at some point but image IDs ran out of the space.
Here is sample reply, notice that image ID in URL is fine, but the ID it self is negative:
<?xml version="1.0" encoding="utf-8"?><methodResponse><params><param><value><struct> <member><name>method</name><value><string>smugmug.images.upload</string></value></member><member><name>Image</name><value><struct><member><name>id</name><value><int>-2146731493</int></value></member><member><name>Key</name><value><string>2JCtpBT</string></value></member><member><name>URL</name><value><string>http://allseasons.smugmug.com/Catego...525767_LdRQQC#2148235803_2JCtpBT</string></value></member></struct></value></member></struct></value></param></params></methodResponse>
0
Comments
If you didn't use the API, with what tools did you obtain the response that you posted?
Can you reproduce the result? If so could you provide the steps that you take to get that response result?
SmugMug Support Hero
That said I'll check with our team to see if we can make it clearer in the API docs on what specified element should be used for the imageID.
SmugMug Support Hero
G'day yanash,
Unfortunately, the XML-RPC spec only supports a 4-byte signed integer. You might be able to convert the result into an unsigned integer. But I believe that the best approach would be to drop XML-RPC and use other API type like JSON, etc.
Cheers,
David
SmugMug API Developer
My Photos