1

am trying to upload files and I discovered that ['tmp_name'] is empty if I select .mp4 file, .pdf and even flv. it works fine with image and doc files and other.. my html

<form id="MaterialUpload" action="#" method="post" enctype='multipart/form-      data' class="form-horizontal form-row-seperated">
                                                                 <input     type="file" name="fileUpload" class="form-control" />


// javascript posting it via ajax
    var formData = new FormData(this);
    $.ajax({
        url: '../CONTROLLER/MaterialAPI.php?CreateCategory=true=',
        type: 'POST',
        data:  formData,
        mimeType:"multipart/form-data",
        contentType: false,
        cache: false,
        processData:false,
        success: function(data, textStatus, jqXHR)
        {
                $(".auctncr").html(data);
        },

// php 
echo $_FILES['fileUpload']['tmp_name'];
JSking
  • 399
  • 1
  • 4
  • 18

1 Answers1

1

In your php.ini change upload_max_filesize.

upload_max_filesize = 2M replace 2 with 6 or 10

K.Srapyan
  • 40
  • 3
  • 1
    since your answer is a guess you should also include the other possibilities. like post_max_size, .. – Jeff Jul 30 '16 at 17:30