[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Reading from a local drive
On Feb 12, 2:20pm, Gavin Bong Chun Jin wrote:
> I intend to write a script that will read a binary file from a local
> file:/// URL. Is that possible? eg. reading a pkzip'ed file?
You need to use the <form ENCTYPE="multipart/form-data" method="POST"> tag
to define a form, and then you need special cgi handling routines to extract
the data. The tag you use to grab the file is "<input type=file SIZE=30
NAME=pkzipfile>". This places a text area and a special button "Browse . . ."
on the client. The client can then specify the file that she wants to xfer.
The cgi routines to handle multipart/form data can be found at:
http://140.114.63.14:6083/doc/upload.html
Mac seems to work well; I haven't tried windows, though. Unix only seems to
work with small files; larger files get a "connection reset by peer: broken
pipe" error.
Hope this helps!
Brian
--
d a t a b a s e s a r e i n o u r g e n e s?
--------------------------------------------------------------------------
Brian Karlak bkarlak@panbio.com (510) 337-7910 ph
Manager, SciApps Group http://www.panbio.com (510) 522-9394 fx
--------------------------------------------------------------------------
P A N G E A S Y S T E M S I N C