473,466 Members | 1,332 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Mod python with multipart


Hi All!

Does anyone know how to read the "multipart/form-data" posted by a form?
I'm using mod_python 3.1 and Apache 2.
I looked at the docs of the request object but there is no description
on how to read multipart data.
I also tried google with "modpython multipart" but there are only a few
hits - I could not use them.

I only need the multipart data as a string - I have already written the
code that splits the data into fielts.
Thanks in advance,

Laci

Jul 18 '05 #1
1 1796
> Does anyone know how to read the "multipart/form-data" posted by a form?
I'm using mod_python 3.1 and Apache 2.
I looked at the docs of the request object but there is no description
on how to read multipart data.
I also tried google with "modpython multipart" but there are only a few
hits - I could not use them.

this is a question for the mod_python ML, but anyway ;)
I'm using

data = cgi.FieldStorage(fp=req,
headers=req.headers_in,
keep_blank_values=True,
environ={'REQUEST_METHOD':'POST'})

which works fine for me. Later I've seen that mod_python has it's own
implementation of FieldStorage, but I have not tried it yet.
Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

34
by: Niels Berkers | last post by:
Hi, i'd like to host my web pages using multiparts to reduce the number of hits on the server. i know this isn't a real PHP subject, but i'll try it anyway. i've been searching the web for...
0
by: Chris McKeever | last post by:
I am trying to modify the Mailman Python code to stop mapping MIME-types and use the extension of the attachment instead. I am pretty much clueless as to what I need to do here, but I think I have...
0
by: David Stockwell | last post by:
Thanks for the help in breaking the problem down into manageable pieces This is the code snippet I ended up using: (I'm decoding excel formatted files) the file is an email i created with pine...
10
by: Andrew Dalke | last post by:
Is there an author index for the new version of the Python cookbook? As a contributor I got my comp version delivered today and my ego wanted some gratification. I couldn't find my entries. ...
3
by: Ricardo Sanchez | last post by:
Hello, I'm trying to upload images to http://imageshac.us via a Python script. I have looked at the POST request with HTTPLiveHeaders Firefox extension when I upload an image, but I can't...
7
by: Mark Waser | last post by:
Hi all, I'm trying to post multipart/form-data to a web page but seem to have run into a wall. I'm familiar with RFC 1867 and have done this before (with AOLServer and Tcl) but just can't seem...
0
by: Kurt B. Kaiser | last post by:
Patch / Bug Summary ___________________ Patches : 414 open ( +1) / 3498 closed ( +9) / 3912 total (+10) Bugs : 949 open ( +6) / 6376 closed (+12) / 7325 total (+18) RFE : 247 open...
0
by: sachintandon | last post by:
Hello all, Thanks in advance for your help I have a problem in sending emails, my requirement is to send multipart alternative emails with attachments, I'm able to send text with attachments or...
2
by: gezerpunta | last post by:
Hi I used pear api to make this mail but I can t add multipart.My mail structure is like that. part 1: a file part 2: multipart part 1: a file part 2: a file
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.