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.

4
  • 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 Commented Jun 4, 2014 at 9:20
  • @shatheesh So what must I set in php.ini? Commented Jun 4, 2014 at 9:26
  • There is an unnecessary closing brace. typo? Commented Jun 4, 2014 at 9: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 Commented Jun 4, 2014 at 9:34

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.