Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: upload image with cgi

by Praveen (Friar)
on Sep 27, 2006 at 05:41 UTC ( #575084=note: print w/replies, xml ) Need Help??


in reply to upload image with cgi

Try This.
#!/usr/bin/perl -w use CGI; $upload_dir = "/home/mywebsite/htdocs/upload"; $query = new CGI; $filename = $query->param("photo"); $filename =~ s/.*[\/\\](.*)/$1/; $upload_filehandle = $query->upload("photo"); open UPLOADFILE, ">$upload_dir/$filename"; binmode UPLOADFILE; while ( <$upload_filehandle> ) { print UPLOADFILE; } close UPLOADFILE;

Replies are listed 'Best First'.
Re^2: upload image with cgi
by Anonymous Monk on Mar 03, 2016 at 04:30 UTC
    This worked for me. Thank you.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://575084]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2022-07-07 13:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?