Reply to Extension as TXT

Extension as TXT new!
by Jefferson, 10 years, 6 months ago
Hi guys, i have this issue, even with $handler->image_convert = 'jpg';, the image comes with txt extension. Here is my code:

include('../../../config.php');
$id = strip_tags( $_GET['id'] );
require_once 'Upload.php';
if(isset($_POST['sendFiles'])){
  if(isset($_FILES['file']) and ($_FILES['file']['tmp_name'] != "")){
    foreach($_FILES['file']['tmp_name'] as $key => $value){
      $upload = new Upload($value);
      if($upload->uploaded){
        $upload->file_new_name_body = "sind";
        $upload->file_dst_name = strtolower($_FILES);
        $upload->image_resize = true;
        $upload->image_ratio_y = true;
        $upload->image_x = 768;
        $upload->image_convert = 'jpg';
        $upload->jpeg_quality = 80;
        $upload->process('../imagens/upload/');
        if($upload->processed){
          $fotos = $upload->file_dst_name;
          $sql = mysql_query("INSERT INTO fotos_galerias (id_galeria, foto, obs_foto) VALUES ('$id', '$fotos', '$desc_')") or print(mysql_error());
        } else {
          echo $upload->error;
        }
      }
    }
  }
}
Reply

Your reply

Name *
Email 
Title *
Text *
CAPTCHA image
Enter the code displayed on the image:
Click on the image to generate another one if it is hard to read it. The case is important