Hi, Alexander

In cocoon 2.0.2 you can specify in web.xml request factory, wich can
parse your multipart request:
<!--
      This parameter allows you to select the request factory. Possible choices are as 
follows:
          - org.apache.cocoon.components.request.MultipartRequestFactoryImpl
          - org.apache.cocoon.components.request.MaybeUploadRequestFactoryImpl
    -->
    <init-param>
      <param-name>request-factory</param-name>
      
<param-value>org.apache.cocoon.components.request.MultipartRequestFactoryImpl</param-value>
    </init-param>

If you want to turn off automatic uploading, write simple request
factory, something like this:


import org.apache.cocoon.components.request.RequestFactory;
...

public class SimpleRequestFactory extends RequestFactory {
        public HttpServletRequest getServletRequest(HttpServletRequest request,
               boolean saveUploadedFilesToDisk,
               File uploadDirectory,
               boolean allowOverwrite,
               boolean silentlyRename,
               int maxUploadSize)
        {
                return request;
        }

        public Object get(HttpServletRequest request, String name) {
               return request.getParameter(name);
        }
}



Tuesday, March 26, 2002, 5:57:38 PM, you wrote:

AK> Hi!
AK> How can I turn off the automatic upload of files sent by an
AK> <input type="file"> ?

AK> I dont know if Tomcat or Cocoon saves all the files to 
AK> %TOMCAT_HOME%\work\localhost\cocoon\cocoon-files\upload-dir

AK> I think Cocoon does this, but why?


AK> Thanks,
AK> Alex.



-- 
Sergey G. Aslanov
CBOSS Group,
Web-technologies department
mailto:[EMAIL PROTECTED]
tel: +7 095 7555655


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to