Re: newbie: file uploads not working :(

2002-09-12 Thread Paul de Repentigny

Alan,

Much easier to read would be:

sub handler {
my $r = Apache::Request-new(shift);
my $file_name = $r-param('see_below');
my $file = $r-upload('see_below');
if ($file) {
# here you go...
# filehandle is in $file-fh;
}
}

On the HTML side, input type=file should read:
input type=file name=see_below

Note: If you ever use them in file posts, don't forget to clean the file
names, especially when it comes from Windows machine...

Paul.

Alan écrivit:

 Hi folks.  I'm new to the list, and relatively new to mod_perl, but a
 big project thrown my way put me right in the middle, and I think I've
 fared well so far, with one exception... file uploads.  I've based my
 code off the apache::request documentation and the file upload code
 snippet posted here and on the perl.apache.org site.
 
 I have the following configured:
 
 ...snip... 
 -





Re: Help with apache::sandwich

2002-06-13 Thread Paul de Repentigny

Éric,

Try:

Directory /web/httpd/htdocs/elterry
... snip ...
/Directory 

instead. Location is used for URIs, not directories.

An alternative would be:

Location /elterry
... snip ...
/Location 

if DocumentRoot is set to /web/httpd/htdocs for Apache.

Paul

Eric Terry écrivit:

 I have the following added to my httpd.conf file:
 
 # (Apache::Sandwich)
 # Add directory custom header
 Location /web/httpd/htdocs/elterry
 SetHandlerperl-script
 PerlHandler   Apache::Sandwich
 PerlSetVar HEADER /my_header.html
 /Location
 
 Here are my html files:
 
 my_header.html:
 html
 head
 titleSystem Wide/title
 /head
 body
 p /I am the header.
 
 Index.html:
 hr
 p /This is just a thought.
 p /But something should be above me.
 /body
 /html
 The header doesn't show up when I go to the index page. What's up?
 
 Eric 
 





Paul de Repentigny
Directeur Développement Logiciel /
Director Software Development
Graph Architecture Inc.
C/C++/Perl/mod_perl/Linux/PHP/MySQL/Lingo/BasicScript/WUP/Etc.
tel:  (418) 659-5611
email: [EMAIL PROTECTED]
web: http://www.grapharchitecture.com/

If you're not part of the solution, start another problem!