[xwiki-users] no acces to POST data via $request.getName
I would like to grep some data from a file upload, but can't find a way to do it. Here are a simple example {{velocity}} #foreach($prop in $request.getParameterNames()) request.$prop #end {{html}} form action= enctype=multipart/form-data method=post div fieldset legendAttach files to this document/legend div input name=a value= size=40 type=text input name=b value= size=40 type=file input name=c value= size=40 type=text /div div input value=Attach class=button type=submit input value=Cancel class=button type=reset /div /fieldset /div /form {{/html}} {{/velocity}} It returns request.a request.c What happened to 'b', is et a bug or a feature? Are there any way to access the value of 'b'? I've been looking at the java code but haven't found anything claiming it should be gone. -Rune ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] no acces to POST data via $request.getName
On Tue, Sep 8, 2009 at 23:32, Rune Hyllebergr...@dpu.dk wrote: I would like to grep some data from a file upload, but can't find a way to do it. Here are a simple example form action= enctype=multipart/form-data method=post input name=b value= size=40 type=file What happened to 'b', is et a bug or a feature? Are there any way to access the value of 'b'? The problem is that b is a file input, and it is not possible to access uploaded files this way. This is a limitation of the servlet request object, outside the scope of Velocity or XWiki. You could use the FileUploadPlugin to access uploaded files instead. http://svn.xwiki.org/svnroot/xwiki/platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/plugin/fileupload/FileUploadPluginApi.java -- http://purl.org/net/sergiu ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users