Re: [Pi3web-users] How do I make a uploader?
Brought to you by:
zimpel
|
From: <zi...@t-...> - 2002-01-13 09:47:19
|
"goku984 dbzmail.com" wrote: > > How do I make it so that other people who come to my server thing can upload some files > onto the server for like a website???? In general, there're some different ways to upload a file to a web server: 1. HTTP/1.1 method PUT -> generic support in Pi3Web 2.0 2. RFC1867 compliant form upload -> generic support in Pi3Web 2.0 3. Frontpage extensions, WebDAV -> no generic support in Pi3Web 4. FTP upload, other ways -> out of scope Remark: 3. may be based on 1. and/or 2. and there're also PHP/CGI/JSP scripts, which upload a file using 1. and/or 2. or even using POST-based mechanism Now more concrete, how is file upload done with Pi3Web 2.0? 1. HTTP/1.1 PUT - Use an html-editor which supports PUT and uses HTTP/1.1 (e.g. Netscape composer unfortunately uses PUT with HTTP/1.0 to publish a file) to publish a file from the editor - Run Pi3Web 2.0 with configuration in Features.pi3, i.e. > cd Pi3Web/bin > Pi3 ../Conf/Features.pi3 - This configuration is for demonstration and allows to create or update an existing file in the WebRoot of the server but can be easily adapted/extended. 2. RFC1867 form upload - Run Pi3Web 2.0 with configuration in Features.pi3 (refer above) - invoke the following URL with your browser (Netscape 4.x or MSIE >5.x) http://localhost/pidocs/Features/fupload.htm - lookup a local file, edit the comment and press 'upload' - the file is uploaded to the WebRoot, and - the file .desc is maintained, which is used to format a directory index - the file [originalname_ext].txt contains a log record Lastly, how to adapt/extend this features? - The PUT related configuration lines in Features.pi3 are: # --- # Upload # Handle file requests with HTTP methods other than GET | HEAD # --- <Object> Name Upload Class FlexibleHandlerClass Condition "¬(&or(&cmpi($m,GET),&cmpi($m,HEAD)))" CheckPath ReturnCode ReturnCode=COMPLETED CheckAccess ReturnCode ReturnCode=COMPLETED # supress conditional get CheckType ReturnCode ReturnCode=COMPLETED # Extended SendFile object will handle # DELETE, PUT and POST HTTP requests Handle SendFile Methods="POST | PUT | DELETE" \ Annotation="From:\t$A$MHost:\t$h$MTime:\t$t$MUrl:\t"$r\"$M" \ DescriptionFile=".desc" </Object> - To adapt/extend this configuration, refer to http://localhost/pidocs/Objects/HTTP.html#SendFile - Limitations: Only upload of one single file per request is supported by both PUT and RFC1867 form upload in Pi3Web 2.0 currently. - Related stuff: Tested ASP 1.0 and ColdFusion 4.5 with Pi3Web but not all aspects. I don't know if content management works based on that. There's also a rudimentary content management for Pi3Web 1.3 upwards. This sub project (called 'Kiev') was frozen and could only revived with additional developer resources. -- regards Holger TMTOWTDI - There's More Than One Way To Do It - Perl motto ---------------------------------------------------------- Holger 'zimpel' Zimmermann ---------------------------------------------------------- Wendishain Germany ---------------------------------------------------------- http://home.t-online.de/home/zimpel/ http://pi3web.sourceforge.net/ mailto:zi...@t-... ---------------------------------------------------------- |