Hi,
I went over the the posting in this thread and TRIED and TRIED to make the coding work. I must be doing something wrong. PLEASE HELP.
in the html coding
------------------
<form action="script_name.cgi" method="post" enctype="multipart/form-data">
<input type="file" name="logo" size="20">
in perl coding
--------------
##--------
# uploadImage()
##--------
sub uploadImage
{
$upload_logo = $field("logo"
$abs_file_to_create .= "/location_on_the_web_server/";
$abs_file_to_create .= "tempfile";
open(NEW_FILE,">$abs_file_to_create" || die "Can't open $abs_file_to_create for output: $!";
$total_size = 0;
while ($size = read($upload_logo, $data, 8192))
{
print NEW_FILE $data;
$total_size += $size;
}
close NEW_FILE;
}
Problem I am having
-------------------
it saves the file in the right location (location_on_the_web_server) but calls the file "tempfile". I would like each entry to have their own file name, example: logo.gif. and logged in each database.
PLEASE HELP. I would love to know where I went wrong
Thank you for your knowledge, wisdom and time!
There
I went over the the posting in this thread and TRIED and TRIED to make the coding work. I must be doing something wrong. PLEASE HELP.
in the html coding
------------------
<form action="script_name.cgi" method="post" enctype="multipart/form-data">
<input type="file" name="logo" size="20">
in perl coding
--------------
##--------
# uploadImage()
##--------
sub uploadImage
{
$upload_logo = $field("logo"
$abs_file_to_create .= "/location_on_the_web_server/";
$abs_file_to_create .= "tempfile";
open(NEW_FILE,">$abs_file_to_create" || die "Can't open $abs_file_to_create for output: $!";
$total_size = 0;
while ($size = read($upload_logo, $data, 8192))
{
print NEW_FILE $data;
$total_size += $size;
}
close NEW_FILE;
}
Problem I am having
-------------------
it saves the file in the right location (location_on_the_web_server) but calls the file "tempfile". I would like each entry to have their own file name, example: logo.gif. and logged in each database.
PLEASE HELP. I would love to know where I went wrong
Thank you for your knowledge, wisdom and time!
There