I think I found the reason why the modification of uploads don't work. It's a problem of the sub copy_attach.
foreach my $attach (@$alist) {
$sth->execute ($lid, $lid . ".fil", $attach->{FileName}, $attach->{FileType}, $attach->{FileSize});
$name = $sth->{mysql_insertid} | | $sth->{insertid};
$file = $LINKS{temp_attach_dir} . "/" . $attach->{ServerName};
$new = $LINKS{attach_dir} . "/" . $name . ".fil";
rename ($file, $new) or die..
The attachement file gets added to the database with the Name $Lid.fil where $Lid is the ID of the link!
The file gets renamend to $InsertID.fil where $InsertID is the ID of the attachement.
My problem is that when adding the recordset I dont know the InsertID? Or is there a way of getting it before the execute(...) command?
Can anybody help on this?
foreach my $attach (@$alist) {
$sth->execute ($lid, $lid . ".fil", $attach->{FileName}, $attach->{FileType}, $attach->{FileSize});
$name = $sth->{mysql_insertid} | | $sth->{insertid};
$file = $LINKS{temp_attach_dir} . "/" . $attach->{ServerName};
$new = $LINKS{attach_dir} . "/" . $name . ".fil";
rename ($file, $new) or die..
The attachement file gets added to the database with the Name $Lid.fil where $Lid is the ID of the link!
The file gets renamend to $InsertID.fil where $InsertID is the ID of the attachement.
My problem is that when adding the recordset I dont know the InsertID? Or is there a way of getting it before the execute(...) command?
Can anybody help on this?