Python 2.6 - Upload zip file - Poster 0.4 -


I have come here through this question:

And greater than that is what I Should, plus some extra

Additional information is required in addition to Ziffile, and POST_DATA looks like this:

  POSTDATA = --------------- - ------------- 293432744627532 Content-presentation: Form-data; Name = "rangeID" 1 ----------------------------- 293432744627532 content-presentation: form-data; Name = "cid" -3 ----------------------------- 293432744627532 Content-Vision: Form-data; Name = "file type" zip ----------------------------- 293432744627532 content-presentation: form-data; Name = "Name" Kylie Minogue ----------------------------- 293432744627532 Content-Configuration: Form-Data; Name = "file1"; Filename = "beach x8-8283.zip" content-type: application / x-zip-compressed pk ........................  

Is it possible with poster 0.4 module (and before you ask, yes, I am fairly new to Python ...)

Kind regards, Brian K. Poster has basic and advanced multilanguage support.
You can try doing something like poster documentation):

  # test_client.py poster.encode import from multipart_encode poster.streaminghttp Import register_openers import urllib2 # urllib2 register_openers with streaming http Register the handlers () # The required content in the header - type and content-length # Datagram is a generator object, encoded parameters Datense, header = multipart_xode ({'categoryID': 1, 'cID': -3, 'file type' : 'Zip', 'Name': 'Kylie Minogue', 'File1': Open ('x8-8283.z on the beach Ip ')}} Request request object = urllib2.Request ("http: // localhost: 5000 / upload_data", datagen, headers) # Really request, and get feedback print urllib2.urlopen (request).)  

Comments

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -