[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cgi-list
Subject:    [CGI] CGI::BasePlus on WIN32 c:\\temp - file upload
From:       mjashcroft <mjashcroft () tasc ! com>
Date:       2000-01-27 19:35:58
[Download RAW message or body]

hello,

running Apache 1.3.9 on NT 4.0 sp5 and using Perl for all CGI.

I have a form to upload files and I've succeeded using CGILite.pm which
allows me to set the upload directory.  I've also succeded using
CGI::BasePlus, ::Request, etc. but am unable to adjust the upload dir?
I've found the code in BasePlus that attemps to set the dir but note
that there is no provision for WIN32 specifically "c:\\temp". It does
make the call to "ENV{TMPDIR}" but runnning this in test code by itself
I see is not defined.  And since the unix dirs are not defined either
the uploaded file ends up in "." or my cgi-bin dir.  So I added
"c:\\temp" to the list in the CGI::BasePlus code

was
@TEMP=('/usr/tmp','/var/tmp','/tmp',);

now
@TEMP=('/usr/tmp','/var/tmp','/tmp','c:/temp',);

and now the file is placed into c:\temp!!


Should I have done this?  

Shouldn't ENV{TMPDIR} be defined and how? (I set it using SET
TMPDIR=C:/TEMP on the command prompt and in a test Perl run from the
command line it works! But not from CGI??)

thanks for any help - discussion in this area of file upload is welcome
from others working in this area.

-mike
mjashcroft@tasc.com
~~~~~~~~~~~~~~~~~~~`
mike ashcroft
mjashcroft@tasc.com
-----------------------------------------------------------------
To unsubscribe, send mail to "majordomo@jann.com" with "unsubscribe cgi-list"
in the body.

CalendarPlus v3.0 with JavaPlus is available NOW!
http://www.calendarplus.com/

The CGI Tips & Tricks website (and archive of the list) is located
at http://perl.jann.com/
-----------------------------------------------------------------

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic