jQuery File Upload - angularjs

2

I moved a site from one server to another. I'm using this file upload tool: here . Now on the new server, selecting more than one file can not upload the image, ie it is not even loaded in the window. Is any php module missing from the new server?

In the log file, it gives the following error:

PHP Warning: exif_imagetype (): Filename can not be empty in /caminho_filheiro/server/php/UploadHandler.php on line 462

Line Code 462:

if (function_exists('exif_imagetype')) {
    switch(exif_imagetype($file_path)){    // ESTA É A LINHA 462
        case IMAGETYPE_JPEG:
            $extensions = array('jpg', 'jpeg');
            break;
        case IMAGETYPE_PNG:
            $extensions = array('png');
            break;
        case IMAGETYPE_GIF:
            $extensions = array('gif');
            break;
    }
        // Adjust incorrect image file extensions:
        if (!empty($extensions)) {
            $parts = explode('.', $name);
            $extIndex = count($parts) - 1;
            $ext = strtolower(@$parts[$extIndex]);
            if (!in_array($ext, $extensions)) {
                $parts[$extIndex] = $extensions[0];
                $name = implode('.', $parts);
            }
        }

The problem at startup is not in the code, since the other server worked fine.

    
asked by anonymous 15.09.2014 / 16:13

1 answer

1

Point 1: Make an echo of the $ upload value ['tmp_name'] [$ index] to see what you have

Point 2: Check that you are recovering value with $ _FILE because from PHP5, simply use the input name does not work anymore

Point 3: Check that you put multiple in HTML and enctype multipat in the FORM tag (enctype="multipart / form-data")

Also to receive more than one document, you should read the list with

 $_FILES[$nome_input]['tmp_name'][$x]

$ x depends on the document number.

Good luck

    
07.10.2014 / 17:14