Options

Faster Upload via POST

devbobodevbobo 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
David Parry
SmugMug API Developer
My Photos

Comments

  • Options
    NikolaiNikolai Registered Users Posts: 19,035 Major grins
    edited September 10, 2006
    David,
    devbobo wrote:
    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


    Thanks for the info...:-) thumb.gif
    Say, does it mean this new way of uploading is FASTER than multi-part? headscratch.gif
    "May the f/stop be with you!"
  • Options
    devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited September 10, 2006
    Nikolai wrote:
    Thanks for the info...:-) thumb.gif
    Say, does it mean this new way of uploading is FASTER than multi-part? headscratch.gif

    yes apparently as much as 25% quicker.
    David Parry
    SmugMug API Developer
    My Photos
  • Options
    NikolaiNikolai Registered Users Posts: 19,035 Major grins
    edited September 10, 2006
    David,
    devbobo wrote:
    yes apparently as much as 25% quicker.
    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.. ne_nau.gif
    "May the f/stop be with you!"
Sign In or Register to comment.