[pmwiki-users] Fox "upload file" does not upload the file if authentication is needed after the form is submitted

Hans design5 at softflow.co.uk
Tue Apr 1 05:57:28 CDT 2008

Tuesday, April 1, 2008, 9:53:42 AM, Graham Archer - EMEA Sun Center Operations wrote:

>  I am using the Fox "file upload " feature and all goes well as
> long as the user is already authenticated for editing....

The file input control is quite special, as it does not just has a
value of a filepath and name, but an array of values associated with
the choosen file. These are not retained when a form is shown again
due to input errors, or as in the case where a login is required.
After login other form data is passed on, but the values from the
file input is lost. I do not know if the eis a method which will
retain these.

So I suggest you use conditional markup to
A) display a warning that the user needs to login first,
B) disable the form till logged in.

you can use for A above the form:

(:if !auth upload:)Please log in before filling in the form!(:if:)

for B inside the form:

(:if auth upload:)(:input submit post '$[Save]':) (:input submit cancel '$[Cancel]':)(:if:)

alternatively you could add a foxcheck:

(:foxcheck target if='auth upload' msg='Please log in!' :)


More information about the pmwiki-users mailing list