here is my code
Code: Select all
if (isset($_POST['Submit']) && $_POST['Submit'] == "Upload") {
$foto_upload->the_temp_file = $_FILES['upload']['tmp_name'];
$foto_upload->the_file = $_FILES['upload']['name'];
$foto_upload->http_error = $_FILES['upload']['error'];
$foto_upload->replace = (isset($_POST['replace'])) ? $_POST['replace'] : "n"; // because only a checked checkboxes is true
$foto_upload->do_filename_check = "n";
if ($foto_upload->upload()) {
$foto_upload->process_image(false, true, true, 80);
$foto_upload->message[] = "Processed foto: ".$foto_upload->file_copy."!"; // "file_copy is the name of the foto"
}
Code: Select all
$foto_upload->replace = (isset($_POST['replace'])) ? $_POST['replace'] : "n"; // because only a checked checkboxes is true
Code: Select all
$foto_upload->convert = (isset($_POST['convert'])) exec('convert file.tga file.png');
- Techku