attachment

ketulp_baroda at yahoo.com ketulp_baroda at yahoo.com
Sun Mar 7 08:00:19 EST 2004


Irmen de Jong <irmen at -NOSPAM-REMOVETHIS-xs4all.nl> wrote in message news:<4049ad99$0$564$e4fe514c at news.xs4all.nl>...
> 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

Hi
Thanks for your reply.
Ya the actual contents are posted along with the file.
See my application is like this:
User can submit any attachment and can view all the attachments
submitted by other users.
Attachment contents can be anything.
So where should I store the attachment 1)In database 2)In a file on
server



More information about the Python-list mailing list