-# $Id: cfspy.conf,v 1.2 2009-04-15 18:23:02 wosch Exp $
+# $Id: cfspy.conf,v 1.3 2009-04-16 18:09:44 wosch Exp $
#
# Sample configuration for running an IRSpy web-site under Apache 2.x.
#
SetHandler perl-script
PerlHandler HTML::Mason::ApacheHandler
</FilesMatch>
+
+ PerlSetVar MasonArgsMethod mod_perl
+
PerlAddVar MasonCompRoot "private => /home/wosch/indexdata/irspy/web/htdocs"
PerlSetVar MasonDataDir /home/wosch/indexdata/irspy/web/data
PerlSetVar IRSpyLibDir /home/wosch/indexdata/irspy/lib
-%# $Id: upload.mc,v 1.2 2007-07-17 14:31:54 mike Exp $
+%# $Id: upload.mc,v 1.3 2009-04-16 18:09:44 wosch Exp $
<%args>
$filename => undef
</%args>
% return;
% }
<%perl>
-my $fin = $r->upload()->fh();
+
+my $fin;
+
+# Apache2.0
+if ($r->isa('Apache2::RequestRec')) {
+ require Apache2::Request;
+ require Apache2::Upload;
+ my $req = new Apache2::Request($r);
+ my $upload = $req->upload('filename');
+ $fin = $upload->fh();
+}
+
+# Apache 1.3
+else {
+ $fin = $r->upload()->fh();
+}
+
if (!defined $fin) {
$m->comp("/details/error.mc", msg => "Upload cancelled");
return;