|
From: James E. M. <jm...@tr...> - 2001-04-07 18:40:44
|
Hi,
Has anybody had any luck with uploading files to a Bender-based site
using form enctype="multipart/form-data"? I've been hitting a brick
wall. I tried lots of things, and read lots of perldoc Apache
and perldoc Apache::Request, but I can't seem to figure it out.
So far I've found that simply relying on the getCurrentForm()
routine in Bender returns a blank form, which is to be expected
(I think) because Apache->request only works for
enctype="application/x-www-form-urlencoded". So I tried
my own version of that by calling Apache::Request->new($r),
but although I get closer, still no data. I am not sure
what to pass to the constructor for the $r, which maybe is the
problem? I am currently doing:
my $r = Apache->request; ## as in Utility.pm
my $apr = Apache::Request->new($r);
my $status = $apr->parse; ## explicit call of parse unneccessary, but
## $status is always zero == no data
print $r->as_string; ## a debugging dump, can see no data is getting up.
Any hints would be appreciated.
thanks in advance,
james
ps,
As to why I am doing this, well, I would like to set up a plugin to
accept academic papers in place of the articles. My colleagues are,
um, complete html idiots. But they can dump Adode PDF files, so
I figured an easy interface would be to allow uploading pdf files.
This would also be useful for writing html articles and then uploading
them, rather than futzing with editing within a browser text box (of
course, lynx lets me spring open emacs, but people who use windows
are not so blessed).
sorry for the lengthy submission.
james
|