in reply to Re: Upload an image file
in thread Upload an image file

Eh, are you running the program on a different machine than where the file actually resides? That's not going to work. Unless you NFS mount the remove disk or so. Or use tied file handles. But it's unlikely either the remote or the local machine are set up that way.

Why not use the file upload routines from CGI.pm?

-- Abigail

Replies are listed 'Best First'.
Re: Re: Upload an image file
by Anonymous Monk on Jul 06, 2001 at 02:43 UTC
    Yes, the script and location that I want to put the files are on the webserver. I am running the script from my own pc.

    What can be done with file handles?

    BY upload routine I assume you mean something like:
    my $file_handle = $req->upload( $file );

    I have tried various ways and get errors with some. I think that I got that one to work eventually, sort of, since the file size still was 0.
      Now I am utterly confused. You run the script on your own PC? Why are you using CGI then? Are you really, really sure you run the script on your PC? Pointing your browser to a URL that causes the script to run on the webserver doesn't make your script run on your PC. It still runs on the webserver.

      With upload routine, I mean what's discussed in the CGI manual page:

      $filename = $query -> param ('uploaded_file'); while (<$filename>) {print}
      with the appropriate name from the form of course.

      -- Abigail

        sorry, you are right. I am not running the script from my own pc, but pointing to it via a browser.

        It's been a long day.....and I still can't get this thing to work :(