rkalla
Sep-25-2007, 08:44 AM
I know the documentation says to use the binary upload methods, and I'll get around to them soon enough, but for coverage sake I am trying to implement the images.upload method at the moment:
http://smugmug.jot.com/WikiHome/1.2.0/smugmug.images.upload
My submission looks like this:
http://upload.smugmug.com/hack/json/1.2.0/?method=smugmug.images.upload
&APIKey=<API KEY>
&SessionID=<SESSION ID>
&AlbumID=<ALBUM ID>
&FileName=<FILE NAME>
&Data=<BASE64 ENCODED DATA>
&ByteCount=<BYTE COUNT>
&MD5Sum=<MD5Sum>
Where the BASE64 encoding is being done using the fast MiGBase64 encoder, the Byte Count (~123k) is that as reported by Windows Explorer and verified from within Eclipse, and the MD5Sum is the value calculated from the DigestUtils.md5Hex method from Commons-Codec project.
The reply I'm getting back from the server is:
{
"stat":"ok",
"method":"smugmug.images.upload",
"Image":{
"id":null
}
}
which is strange, but I checked the album I'm "uploading" to, and nothing ever gets added to it. :scratch
Any help would be appreciated.
http://smugmug.jot.com/WikiHome/1.2.0/smugmug.images.upload
My submission looks like this:
http://upload.smugmug.com/hack/json/1.2.0/?method=smugmug.images.upload
&APIKey=<API KEY>
&SessionID=<SESSION ID>
&AlbumID=<ALBUM ID>
&FileName=<FILE NAME>
&Data=<BASE64 ENCODED DATA>
&ByteCount=<BYTE COUNT>
&MD5Sum=<MD5Sum>
Where the BASE64 encoding is being done using the fast MiGBase64 encoder, the Byte Count (~123k) is that as reported by Windows Explorer and verified from within Eclipse, and the MD5Sum is the value calculated from the DigestUtils.md5Hex method from Commons-Codec project.
The reply I'm getting back from the server is:
{
"stat":"ok",
"method":"smugmug.images.upload",
"Image":{
"id":null
}
}
which is strange, but I checked the album I'm "uploading" to, and nothing ever gets added to it. :scratch
Any help would be appreciated.