0

I upload a file using XMLHttpRequest, for the first file I uploaded was not a problem but for the second file that I uploaded, I face a problem. url just spinning without reaction, with an empty file POST and not entered into the server side. and this happen when I upload files above 100MB. for info I use tools:EXTJS,jQuery.

enter image description here

this is my code :

var formData = new FormData();

    // Append each file to the FormData() object
    formData.append('FdId',folder_id);
    formData.append('file', files[0]);

    $.ajax({
        url: '/douploadfile',  //server script to process data
        type: 'POST',
        data: formData,
        //Options to tell JQuery not to process data or worry about content-type
        cache: false,
        contentType: false,
        processData: false,
        success:{},
        failure:{}  
        }
    }); 

So is there something wrong with my code? I hope someone can help me to solve my problem, thank you.

Menma
  • 799
  • 1
  • 9
  • 35
  • check `max_file_uploads, upload_max_filesize ` in your `php.ini`. Also set `set_time_limit(0)` so that script wont time out after 30 seconds . Read this [http://www.php.net/manual/en/function.set-time-limit.php](http://www.php.net/manual/en/function.set-time-limit.php) – shatheesh Jun 04 '14 at 09:20
  • @shatheesh So what must I set in `php.ini`? – Menma Jun 04 '14 at 09:26
  • There is an unnecessary closing brace. typo? – KNaito Jun 04 '14 at 09:32
  • `upload_max_filesize` should be greater than the size of the image to be uploaded. Also add `set_time_limit(0)` in your php image upload file – shatheesh Jun 04 '14 at 09:34

0 Answers0