Wrong MD5Sum Reported By Server
adamc
Registered Users Posts: 25 Big grins
I have been able to upload files to the server successfully, but suddenly now I'm getting a message saying that my md5 is wrong.
The weird thing is that the one it is expecting is 33 characters instead of 32. For some reason it is inserting a random 0 into the expected md5 sum.
If I remove the MD5 from my header, it works fine. If this is really broken server-side, and since nobody is reporting it, I'm guessing most other API users don't use MD5 either?
{"stat":"fail","code":60,"message":"corrupt file
(ByteCount given: 5192, received: 5192.
MD5Sum given: d170fc7e547af33c15b57593f5ca0c4,
actual: d170fc7e547af33c15b57593f50ca0c4.)"}
The weird thing is that the one it is expecting is 33 characters instead of 32. For some reason it is inserting a random 0 into the expected md5 sum.
If I remove the MD5 from my header, it works fine. If this is really broken server-side, and since nobody is reporting it, I'm guessing most other API users don't use MD5 either?
{"stat":"fail","code":60,"message":"corrupt file
(ByteCount given: 5192, received: 5192.
MD5Sum given: d170fc7e547af33c15b57593f5ca0c4,
actual: d170fc7e547af33c15b57593f50ca0c4.)"}
0
Comments
Actually, I'd say that the overwhelming majority of uploaders send the md5 (including SmugMug's own uploaders).
Is it possible to get some more information like...
- what's this programmed in ?
- what specific upload endpoint are you using ? PUT, Raw POST or Multi-Part POST ?
Could you please also send me a copy of the original file or link me to it uploaded on SmugMug so that I can validate it.
Thanks,
David
SmugMug API Developer
My Photos
adam
{"stat":"fail","code":60,"message":"corrupt file (ByteCount given: 325835, received: 325835. MD5Sum given: 91d2161faec8d13a19c2fff3e8db51d3, actual: 91d2161faec8d13a19c2fff3e8db51d3.)"}
{"stat":"fail","code":60,"message":"corrupt file (ByteCount given: 220454, received: 220454. MD5Sum given: 1f135518d60bb47d2735100b7a0cfc4f, actual: 1f135518d60bb47d2735100b7a0cfc4f.)"}
Without specifying the MD5Sums the uploads work fine. Links to the files
http://cschubert.smugmug.com/Landscapes/Rombergpark/10486555_u7xWQ#993359624_Vi8cE
http://cschubert.smugmug.com/Landscapes/Rombergpark/10486555_u7xWQ#993359595_g73XL
Some details: I use Mac OS 10.6.4, Objective-C (Cocoa with Appkit 6.6.6, Core-Foundation 6.6.3), http-method put, endpoint http://upload.smugmug.com/, SmugMug Api 1.2.0
Thanks and cheers,
Christoph
****** UPDATE ******
Changed my hex to use lower case (e.g., ffee) instead of upper (FFEE), and it now works. (Error message used lower case even when I sent upper, indicating that the comparison was not case insensitive, but the formatting of the error message reported the MD5s as lower case. Just need to get the guy who did the error message to change the code itself. ;-) )
--Marc