[pmwiki-users] uploading with wikifarms

Maria McKinley parody at u.washington.edu
Tue Nov 13 00:57:23 CST 2007


On 11/12/07, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> 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
>

Thanks. I'm afraid that didn't work, although it seems like it should.
I get a permission error, but all of the directories are world
readable and owned by www-data, and I was able to upload the files, so
I think it still is looking in the wrong place.

Maybe this stuff from my config.php will help:

$WikiDir = new PageStore('/var/www/wikifarm/maria/{$FullName}');
$WorkDir = '/var/www/wikifarm/maria';
$FarmD = '/var/www/pmwiki';
$UploadDir = '/var/www/wikifarm/maria/upload';

Maybe it is a bad idea to include the upload directory in the same
directory that pmwiki uses to keep all of the files it writes?

thanks,
maria



More information about the pmwiki-users mailing list