Uploading via post

NikolaiNikolai Darth SLRRegistered Users Posts: 19,035 Major grins
I would REALLY appreciate if somebody can provide a little bit more details on how this thing work. :bow

Very simple example would be suffice:
how to upload file c:\mypictures\img_001.jpg by using this method?

I (seem to) have no problem with the regular 'upload' method. However, as far as I'm going to eventualy release this app for a general audience, which may not not necessarily have access to a few T3 lines as I do, this seems to be a "preferred way" to do this.

I'm using Delphi6 and Indy/SSL, but all the xml/text manipulation stuff is done "by hand". So perl/python magic will not help much..:dunno

Thank you!
"May the f/stop be with you!"

Comments

  • ruttrutt Cave canem! Registered Users Posts: 6,511 Major grins
    edited November 22, 2004
    Look at the python script. For uploadig via post, there isn't much magic. I had to get down and dirty.
    If not now, when?
  • NikolaiNikolai Darth SLR Registered Users Posts: 19,035 Major grins
    edited November 22, 2004
    Rutt,
    rutt wrote:
    Look at the python script. For uploadig via post, there isn't much magic. I had to get down and dirty.
    I'm kinda new to the whole Intenet programming (I know, it's been around for a while, but I never had a solid chance to get my hands on it, so I'm a "traditional" programmer), hence I'm a bit confused. I googled it, alright. Smugmug's "hack" guide says about bandwidth issue, but at this point I don't see how splitting the same base64 encoded image into several parts and uploading the one by one would affect that issue..
    Am I missing something? ne_nau.gif
    Thanks for your time!
    "May the f/stop be with you!"
  • ruttrutt Cave canem! Registered Users Posts: 6,511 Major grins
    edited November 23, 2004
    Nikolai wrote:
    I'm kinda new to the whole Intenet programming (I know, it's been around for a while, but I never had a solid chance to get my hands on it, so I'm a "traditional" programmer), hence I'm a bit confused. I googled it, alright. Smugmug's "hack" guide says about bandwidth issue, but at this point I don't see how splitting the same base64 encoded image into several parts and uploading the one by one would affect that issue..
    Am I missing something? ne_nau.gif
    Thanks for your time!
    The post upload method doesn't encode the content at all. My python script is here. Read the functions upload_file, post_multipart, and post_multipart_formdata. I sweated to get this working about a year ago, but I think that it's easy to read.
    If not now, when?
  • NikolaiNikolai Darth SLR Registered Users Posts: 19,035 Major grins
    edited November 23, 2004
    Thanks, man!
    rutt wrote:
    The post upload method doesn't encode the content at all. My python script is here. Read the functions upload_file, post_multipart, and post_multipart_formdata. I sweated to get this working about a year ago, but I think that it's easy to read.
    I appreciate your help!bowdown.gif
    "May the f/stop be with you!"
  • NikolaiNikolai Darth SLR Registered Users Posts: 19,035 Major grins
    edited November 24, 2004
    Multipart Upload Works!
    Turned out to be simpler than I thought.
    Thanks, rutt, for the field names!bowdown.gif
    I'm not sure if it is an accurate benchmark, but same 5mp file took 2:45 via XML/base64 and 2:04 via multipart upload (I tried it at home via wireless router and rather slow DSL, which I think was a major bottleneck during the upload). So we're talking about 25%-30% savings - pretty close to the base64 theory:-)
    "May the f/stop be with you!"
Sign In or Register to comment.