[Pmwiki-users] Upload problem
Patrick R. Michaud
pmichaud
Sat Feb 28 21:01:03 CST 2004
On Sun, Feb 29, 2004 at 04:26:43PM +1300, Robin Sheat wrote:
> On Sat, Feb 28, 2004 at 08:18:44PM -0700, Patrick R. Michaud wrote:
> > I think it's likely to be a problem related to the fact that you
> > don't have a normal $ScriptUrl--i.e., your pages are of the
> > form "http://www.kallisti.net.nz/Main/WikiSandbox", which means
> ah, I see. That makes sense. Yeah, the easiest way I found of doing that
> was to Redirect /index.html http://www.kallisti.net.nz/Main/HomePage
> and have capital-starting paths AliasMap'ped to wiki/pmwiki.php
>
> Is there a better way, or is this way good enough?
>
> > You probably need to set your Upload form so that it posts the
> > data to $PageUrl instead of $ScriptUrl. I may make this change
> OK. Umm...how do I do this? :)
In config.php:
$PageUploadFmt=array(
"<h1 class='wikiaction'>$[Attachments for] \$PageName</h1>
<h3>\$UploadResult</h3>
<form enctype='multipart/form-data' action='\$PageUrl' method='post'>
<input type='hidden' name='pagename' value='\$PageName' />
<input type='hidden' name='action' value='postupload' />
<input type='hidden' name='upname' value='\$UploadName' />
<table border='0'>
<tr><td align='right'>$[File to upload:]</td><td><input
name='uploadfile' type='file' /></td></tr>
<tr><td align='right'>$[Name attachment as:]</td>
<td><input type='text' name='upname' value='\$UploadName' />
<input type='submit' value=' $[Upload] ' /><br />
</td></tr>
</table>
</form>",'wiki:$[PmWiki.UploadQuickReference]');
or, if you've got a custom template, you can make the change there
with
<!--PageUploadFmt-->
<h1 class='wikiaction'>$[Attachments for] $PageName</h1>
<h3>$UploadResult</h3>
<form enctype='multipart/form-data' action='$PageUrl' method='post'>
<input type='hidden' name='pagename' value='$PageName' />
<input type='hidden' name='action' value='postupload' />
<input type='hidden' name='upname' value='$UploadName' />
<table border='0'>
<tr><td align='right'>$[File to upload:]</td><td><input
name='uploadfile' type='file' /></td></tr>
<tr><td align='right'>$[Name attachment as:]</td>
<td><input type='text' name='upname' value='$UploadName' />
<input type='submit' value=' $[Upload] ' /><br />
</td></tr>
</table>
</form>
<!--wiki:$[PmWiki.UploadQuickReference]-->
<!--/PageUploadFmt-->
Pm
More information about the pmwiki-users
mailing list