There is a form

<form action=""> <input type="file" name="file" > <input type="submit" name="send" value="Отправить"></input> </form> 

jQuery script

 $('input').on('change', function(e){ e.preventDefault(); var self = $(this), file = self[0].files[0]; fd = new FormData(); fd.append('file', file); $.ajax({ url: 'load.php', type: 'POST', data: fd, cache: false, processData: false, contentType: false, xhr: function() { var myXhr = $.ajaxSettings.xhr(); if(myXhr.upload){ myXhr.upload.addEventListener('progress',function(e){ if(e.lengthComputable){ var max = e.total; var current = e.loaded; console.log('Загружено: ' + current + ' из ' +max ); } }, false); } return myXhr; }, success: function(data){ console.log(data); }, }); }); 

load.php

  <?php var_dump($_FILES); 

If I load a picture, weighing 1-2mb - in my console I have this: enter image description here

But, if I try to upload a .mp4 file with a weight of 8mb, it writes how much is loaded, but on the $ _FILES server it is empty ...

enter image description here

Why is $ _FILES empty? Restrictions can any check? ...

It's all about file weight. If I ship above 5MB in size, it does not show in $ _FILES ...

    1 answer 1

    In php.ini change the upload_max_filesize setting.

    • Exactly, just needed to change and: post_max_size - user190134