The joy of zero-based vs one-based arrays :-)
--
View this message in context:
http://xwiki.475771.n2.nabble.com/Reading-a-file-submitted-from-a-form-tp7593368p7593394.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users
: Tuesday, 9 December 2014 9:04 PM
To: users@xwiki.org
Subject: Re: [xwiki-users] Reading a file submitted from a form
The joy of zero-based vs one-based arrays :-)
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo
: Tuesday, 9 December 2014 9:04 PM
To: users@xwiki.org
Subject: Re: [xwiki-users] Reading a file submitted from a form
The joy of zero-based vs one-based arrays :-)
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
I wrote:
[...] I'd like to perform a simple check that I can access the file (by
returning the file size and a line-by-line echo) using a velocity script:
{{velocity}}
#if ($request.addFile == true)
{{info}}Request received to add file{{/info}}
#set ($fileUpload = $xwiki.fileupload)
Hi,
I have a form as follows:
{{html}}
form action= enctype=multipart/form-data method=post
input type=hidden name=addFile value=true /
input type=file id=myupload name=newfile /
input type=submit
/form
{{/html}}
And I'd like to perform a simple check that I can access the file (by returning