(!move_uploaded_file ($file ["tmp_name"], $dest))) {
server_error ();
}
+ send_to_ftp ($dest);
$mini_dest = getthumbsdir () . "/mini_" . basename_safe ($dest);
if (!create_thumbnail_or_copy ($dest, $mini_dest)) {
server_error ();
}
+ send_to_ftp ($mini_dest);
}
return basename_safe ($dest);
}
$path = UPLOADDIR . "/" . $imgpath;
if (file_exists ($path)) {
unlink ($path);
+ delete_from_ftp ($path);
}
$thumb_path = getthumbsdir () . "/mini_" . $imgpath;
if (file_exists ($thumb_path)) {
unlink ($thumb_path);
+ delete_from_ftp ($thumb_path);
}
}