home *** CD-ROM | disk | FTP | other *** search
/ PC World 2002 May / PCWorld_2002-05_cd.bin / Komunik / sambar / sambar51p.exe / docs / samples / upload.stm < prev    next >
Encoding:
Text File  |  2002-01-13  |  1.4 KB  |  47 lines

  1. <RC$title = Upload File>
  2. <RC$navurl = /samples/index.stm>
  3. <RC$navname = Samples>
  4. <RCinclude /header.stm>
  5. <BR>
  6. <font size=5><B>Sample File Upload Form</B></font>
  7. <P>
  8. This page allows you to upload a file.  Note that the Sambar
  9. Server limits the size of POST content to around 50k (so that 
  10. the server doesn't get swamped with data).  This parameter 
  11. is configurable in the <I>config.ini</I> file (<B>Maximum Content-Length</B>).
  12. Only localhost (127.0.0.1) is permitted to upload scripts 
  13. (see cgi-bin/upload.pl to customize this).
  14. <P>
  15. The file upload form looks just like any other form except that:
  16. <UL>
  17. <LI> The form tag must specify the <tt>POST</tt> method
  18. <LI> The form tag must specify an enctype of <tt>multipart/form-data</tt>
  19. <LI> The form must contain an <tt><input type=file></tt> element.
  20. </UL>
  21. <P>
  22. You can do a view source on this document to see all the elements.  
  23. Uploaded files are placed in the <A HREF="/upload/">upload</A> directory.
  24. <P>
  25. <HR>
  26. <H2>File Upload Form</H2>
  27.  
  28. <FORM method=POST action="/cgi-bin/upload.pl" enctype="multipart/form-data">
  29. <TABLE border=0 cellpadding=5>
  30. <TR>
  31. <TD>File to upload</TD>
  32. <TD><input type=file size=60 name=upfile></TD>
  33. </TR>
  34. <TR>
  35. <TD>File name</TD>
  36. <TD><input type=text value="test" name=upname></TD>
  37. </TR>
  38. <TR>
  39. <TD></TD>
  40. <TD><input type=submit value=Upload></TD>
  41. </TR>
  42. </TABLE>
  43. <P>
  44. </FORM>
  45.  
  46. <RCinclude /footer.stm>
  47.