attachment

Irmen de Jong irmen at -NOSPAM-REMOVETHIS-xs4all.nl
Sat Mar 6 05:53:14 EST 2004


ketulp_baroda at yahoo.com wrote:

> ketulp_baroda at yahoo.com wrote in message news:<f046efac.0403030156.7e8257c9 at posting.google.com>...
> 
>>Hi
>>I am trying to upload a file using <input type="file"....>
>>I want to know what is the best way to store this uploaded file 
>>Should I store it in the databse??
>>Or should I store the entire file on the server??
> 
> 
> If I decide to store the file on the server,then di I have to use ftp
> to copy the file on the server??

No, the actual file contents is submitted as part of the HTTP POST request.
(make sure you use method="post" and enctype="multipart/form-data" in your form).
Python's cgi module knows how to deal with it.

Where you store your file is entirely up to you and depends on what
you want to do with it.

--Irmen



More information about the Python-list mailing list