You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by gh...@apache.org on 2003/05/18 03:53:13 UTC

cvs commit: cocoon-2.1/src/webapp/samples/xsp/xsp upload.xsp

ghoward     2003/05/17 18:53:13

  Modified:    src/webapp/samples/xsp/xsp upload.xsp
  Log:
  Add some basic explanation, and a warning if 
  enable-uploads is false (the default).
  
  Revision  Changes    Path
  1.3       +11 -1     cocoon-2.1/src/webapp/samples/xsp/xsp/upload.xsp
  
  Index: upload.xsp
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/webapp/samples/xsp/xsp/upload.xsp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- upload.xsp	7 May 2003 04:57:15 -0000	1.2
  +++ upload.xsp	18 May 2003 01:53:13 -0000	1.3
  @@ -24,6 +24,13 @@
     <page>
      <title>This form allows you upload files</title>
      <content>
  +   	 <para>Uploads in cocoon are handled automatically, as configured in web.xml.  
  +   	 The relevant init-params controlling upload behavior are: enable-uploads, 
  +   	 upload-directory, autosave-uploads, overwrite-uploads, upload-max-size.
  +   	 </para>
  +	 <para>All files are cleaned out of the upload directory at the end of the 
  +	 request.  The assumption is that other application logic will have acted on 
  +	 the files during the request.</para>
        <para>
          <form method="post" enctype="multipart/form-data" action="upload">
            File:  <input type="file" name="uploaded_file" size="50" />
  @@ -51,6 +58,9 @@
                </strong>
                <br/>
              </xsp:content>
  +         } else if (request.getContentType()!=null &amp;&amp; request.getContentType().indexOf("multipart/form-data") != -1) {
  +         	<para><strong>Either uploads are turned off, or you submitted a blank form.</strong></para>
  +         	<para>To enable uploads, ensure that the value for the init-param "enable-uploads" in web.xml is set to true.</para>
            }
          </xsp:logic>