Hi ALL,

I am having a hell of a time trying to get a file to upload. The file gets
created and then nothing gets put into the file!

Here is my code:

<H1 ALIGN="CENTER"><img src="../misc/csc_logo_neon.png" width="102"
height="49" align="left">Incidents Reports &ndash; New Report: Upload
Additional Files</H1>

<HR>

<P STYLE="margin-left: 2in">The file you enter in the following text box
will be uploaded to the /tmp directory if you hit the "upload
file"button.<BR>
</P>

[$ if !defined $fdat{ImageName} $]
    <FORM METHOD="POST" ENCTYPE="multipart/form-data"
ACTION="upload.html">
        <P STYLE="margin-left: 2in">
          <INPUT TYPE="FILE" NAME="ImageName">
          <INPUT TYPE="SUBMIT" NAME="Submit" VALUE="Upload file">
        </P>
    </FORM>
[$else$]

[-
use DBI;
use CGI;

$req = shift;
my $upload = CGI->new();


$udat{incidentnumber} = 9;

$filenamesent = $fdat{ImageName};

         open FILE, "> /tmp/file.$$";
         binmode FILE;
         print FILE $buffer
           while read($fdat{ImageName}, $buffer, 32768);
         close FILE;

-]

<P STYLE="margin-left: 2in">
 Your file has been saved to [+ $pathfile  +]
<br>
 Your file has been saved to [+ $fdat{ImageName}  +]
<br>
</P>
   <FORM METHOD="GET">
      <P STYLE="margin-left: 2in"><INPUT TYPE="SUBMIT" NAME="Submit"
VALUE="Upload new file"></P>
   </FORM>


[$endif$]


And here is what I get for attempting :)
-rw-r--r--   1 http http      0 Mar 20 17:59 file.25739
-rw-r--r--   1 http http      0 Mar 20 18:07 file.4973
-rw-r--r--   1 http http      0 Mar 20 17:33 file.5393


Any ideas?


Keven Murphy
[EMAIL PROTECTED]

Murphy's Law
((U+C+I)x(10-S))/20xAx1/(1-sin(F/10))
U = Urgency    C = Complexity
I = Importance S = Skill
F = Frequency  A = Aggravation


This is an e-mail from General Dynamics Land Systems. It is for the intended 
recipient only and may contain confidential and privileged information.  No one 
else may read, print, store, copy, forward or act in reliance on it or its 
attachments.  If you are not the intended recipient, please return this message 
to the sender and delete the message and any attachments from your computer. 
Your cooperation is appreciated.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to