Faster Upload via POST
devbobo
Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
Hey Guys,
Don mentioned this in a thread a couple of days ago, but did give any real details. So here's the lowdown, instead of using a multi-part form defined in the body of the message. Move the pertainent information into the one of the corresponding HTTP headers below ...
X-Smug-SessionID
X-Smug-Version
X-Smug-ResponseType (use XML-RPC or REST)
X-Smug-AlbumID
X-Smug-Caption
X-Smug-FileName
You will still need to added any existing HTTP headers like Content-Length, etc and the raw image data should remain in the body of the message.
And you post to this url instead...
http://upload.smugmug.com/photos/xmlrawadd.mg
Let me know if you need any more details info.
Cheers,
David
Don mentioned this in a thread a couple of days ago, but did give any real details. So here's the lowdown, instead of using a multi-part form defined in the body of the message. Move the pertainent information into the one of the corresponding HTTP headers below ...
X-Smug-SessionID
X-Smug-Version
X-Smug-ResponseType (use XML-RPC or REST)
X-Smug-AlbumID
X-Smug-Caption
X-Smug-FileName
You will still need to added any existing HTTP headers like Content-Length, etc and the raw image data should remain in the body of the message.
And you post to this url instead...
http://upload.smugmug.com/photos/xmlrawadd.mg
Let me know if you need any more details info.
Cheers,
David
0
Comments
Thanks for the info...:-)
Say, does it mean this new way of uploading is FASTER than multi-part?
yes apparently as much as 25% quicker.
SmugMug API Developer
My Photos
I think I have found the post you were talking about..
Unless I'm very wrong, Don's saying that new (undocumented) method is ~25% faster than the original post method, not the multi-part one, and exactly for the same reason - no BASE64 encoding is required.
So I guess I'll stick with multipart for now, no reason to change the code to get the same speed..