[pmwiki-users] uploading with wikifarms

Patrick R. Michaud pmichaud at pobox.com
Mon Nov 12 12:32:05 CST 2007


On Sun, Nov 11, 2007 at 01:10:34AM -0800, Maria McKinley wrote:
> Hello there,
> 
> I set a new directory for uploads using:
> 
> $UploadDir = '/var/www/wikifarm/maria/upload';
> $UploadUrlFmt = 'http://www.shadlen.org/~maria/upload';
> 
> I can upload just fine, and it puts the files in
> /var/www/wikifarm/maria/upload, but when I try to click on a file that
> is uploaded, I get a file doesn't exist message. I am using
> (:attachlist:) to list the files, which is does, but it seems to go to
> the wrong directory if I click on a file. Does the download feature
> not use the same variable $UploadDir for finding files?

$UploadDir indicates where the files are to be stored in the filesystem,
$UploadUrlFmt indicates the url that a browser should use to locate
the file.  

In the above, unless the url 'http://www.shadlen.org/~maria' somehow 
points to the /var/www/wikifarm/maria directory on the filesystem, 
it's not likely to work.  Normally the '/~maria' syntax in a url
refers to user maria's home directory, although the webserver can
certainly choose to map it somewhere else.

My guess based on the limited information available is that 
$UploadUrlFmt needs to be set as

    $UploadUrlFmt = '/wikifarm/maria/upload';

Pm



More information about the pmwiki-users mailing list