[opencms-dev] multipart uploads

Christian Steinert christian_steinert at web.de
Mon Feb 6 01:04:27 CET 2012


Hi Marko

I am not sure if and how the code below works or doesn't work. But why would you need to create a CmsRequestHttpServlet? The code below looks like it is on the receiving end, i.e. as if it is supposed to run inside of opencms. As such, I don't think you need to worry about creating any request-related classes.

Kind regards
Christian

> Hello there,
>
> I would like to add multipart uploads to an OpenCMS
> website that I maintain. I found the following code on the internet, but
>   it does not work:
> <%
> com.opencms.file.CmsObject cms =
> ((com.opencms.flex.cache.CmsFlexRequest)request).getCmsObject();
> Enumeration files = cms.getRequestContext().getRequest().getFileNames();
> while(files.hasMoreElements()) { String filename = (String)files.nextElement(); byte[] filecontent =
> cms.getRequestContext().getRequest().getFile(filename); // do somthing with filename / filecontents here ...
> }
> %>
>
> Also, I could not figure out how to create a CmsRequestHttpServlet.
>
> Thanks!
>
> Marko Riedel
>
>   
> +---------------------------------------------------+
> | Marko Riedel, markoriedelde at yahoo.de              |
> | http://www.mathematik.uni-stuttgart.de/~riedelmo/ |
> +---------------------------------------------------+
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev
>
>
>
>




More information about the opencms-dev mailing list