View Full Version : Uploading via post
Nikolai
Nov-21-2004, 05:51 PM
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!
rutt
Nov-22-2004, 05:39 PM
Look at the python script. For uploadig via post, there isn't much magic. I had to get down and dirty.
Nikolai
Nov-22-2004, 06:25 PM
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? :dunno
Thanks for your time!
rutt
Nov-23-2004, 04:14 AM
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? :dunno
Thanks for your time!
The post upload method doesn't encode the content at all. My python script is here. (http://www.chezrutt.com/rutt/smugmug/smugmug.py) 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.
Nikolai
Nov-23-2004, 08:16 AM
The post upload method doesn't encode the content at all. My python script is here. (http://www.chezrutt.com/rutt/smugmug/smugmug.py) 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!:bow
Nikolai
Nov-23-2004, 11:52 PM
Turned out to be simpler than I thought.
Thanks, rutt, for the field names!:bow
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:-)
vBulletin v3.5.2, Copyright ©2000-2008, Jelsoft Enterprises Ltd.