[pmwiki-users] Getting a Zap upload form to work

Benoît DUTILLEUL benoit.dutilleul at googlemail.com
Tue Mar 6 18:11:54 CST 2007


Dear all,

I forward you more info and test results about this issue. If anyone has an
idea, please help!
Cheers,

Benoit

On 3/6/07, Benoît DUTILLEUL <benoit.dutilleul at googlemail.com> wrote:
> Hello Dan,
>
> I've changed the line you told me to change. Here is what I get:
> Form submitted. Missing fields required for upload feature.Hope this
helps.

That indicates ZAP could not find either upname or uploadfile.  No
idea why, as both seem to be in the form.  Perhaps you could repost to
the list with the new info and see if someone can suggest why your
form is failing this conditional:

if (($ZAParray['uploadfile'] != "") && ($ZAParray['upname'] != ""))
      HandlePostUpload($pagename);

---------- Forwarded message ----------
From: The Editor <editor at fast.st>
Date: 6 mars 2007 23:17
Subject: Re: [pmwiki-users] Getting a Zap upload form to work
To: Benoît DUTILLEUL <benoit.dutilleul at googlemail.com>
Cc: Patrick Michaud <pmichaud at pobox.com>

Here's the HTML (below) in case anyone spots a problem...

Hmmm, I also think I see the problem.  The word "upload" in the markup
is supposed to add the enctype value to the form element.  It's not
there, so PmWiki can't do the upload.  Let me check and see what's
happening...

Ok, evidently, just putting a word like upload in the form is not
caught by the parseargs function.  If you change your form line to

(:zapform upload='' name=UploadPhoto:)

It will trigger the function and add the command you need to the form
element.  Try this and see if it doesn't work.  If it does, I'll
either have to find a way to rewrite the script or rewrite the docs...
But let's get it working first!

Cheers,
Dan


<form name="UploadPhoto"
action="
http://etudier-en-france.org/pmwiki/fields/RnD/index.php?n=Account.TestUploadPhoto
"
method="post" target="_blank" onsubmit="return
window.confirm(&quot;You are submitting information to an external
page.\nAre you sure?&quot;);"><input type="hidden" name="PHPSESSID"
value="235a89e86438576bf41cca29e42dc098"><input type="hidden"
name="action" value="zap"><input type="hidden" name="ZAPkey"
value="UploadPhoto">
<table width="600px" bgcolor="#fff7bd"><tr><td width="20px" valign="top">
</td><td valign="top">Photo:
</td></tr><tr><td valign="top">
</td><td colspan="2" valign="top"><input type="file"
name="uploadfile"><input type="hidden" name="upname" value="test.jpg">
</td></tr><tr><td height="10px" valign="top">
</td></tr><tr><td valign="top">
</td><td colspan="2" valign="top"><input type="submit"
name="UploadPhoto" value="Terminer l&#39;enregistrement">
</td></tr><tr><td height="20px" valign="top">
</td></tr></table></form>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/pmwiki-users/attachments/20070307/19d706ff/attachment-0001.html 


More information about the pmwiki-users mailing list