Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Re: File upload

Quote Reply
Re: File upload In reply to
I managed to do the single file upload sucessfully:
In sub add_record
add:
if (($status eq "ok") && ($in{'Filename'})) { $status = &validate_upload; } #Validate Picture
after
foreach $name (@db_cols) {
next if ($in{$name} =~ /^\s*$/);
$insert_name .= "$name,";
$db_is_int{$name} ?
($insert_value .= int($in{$name}) . ",") :
($insert_value .= $DBH->quote($in{$name}) . ",");
}
chop ($insert_name); chop ($insert_value); # Remove trailing delimiters.

$query = qq!
INSERT INTO $db_table ($insert_name)
VALUES ($insert_value)
!;


in sub modify_record
change:
my ($status, $line, @lines, @data, $output, $found, $restricted);
to
my ($status, $line, @lines, $id, @rest, $output, $found, $userid_q, $key_q);

add if (($status eq "ok") && ($in{'Filename'})) { $status = &validate_upload; } # Validate Picture
after
$status = &validate_record; # Check to make sure the modifications are ok!

All other modifications as per http://www.jpdeni.com/dbman/Mods/file_upload2.txt

I also have the multi upload working except that it will upload more than the $MAXIMUM_UPLOAD set.


Subject Author Views Date
Thread File upload johnr 2113 Sep 27, 2000, 10:52 AM
Thread Re: File upload
johnr 2016 Oct 4, 2000, 4:41 PM
Post Re: File upload
TheFox 1919 Dec 28, 2000, 10:46 PM