Tell me why the file can not be transferred to the server?
<form action="" enctype="multipart/form-data" accept="image/*"> <div class="col-md-offset-1 col-md-5"> <input type="text" name="name" placeholder="Имя" requered><br> <input type="text" name="phone" placeholder="Телефон" requered><br> <input type="text" name="email" placeholder="E-mail"><br> <textarea id="" cols="30" rows="10" placeholder="Комментарий" name="text-comments"></textarea> <input type="file" name="file"><br> <input id="form-action" type="button" class="send" value="Купить в один клик"><br> </div> </form> $(document).ready(function(){ $(document).on("click","#form-action", function(event){ event.preventDefault(); if($("input[name='fio']").val()!="" && $("textarea").val()!=""){ var data = $("form").serialize(); $.post("/ajax/handler.php",{data},function(data,status){ console.log(data); $(".block_error").html("<div class='col-md-offset-1 text-left'><span style='color:#f29400'>Ваше сообщение отправленно.</span></div>"); //location.reload(); }); } else { $(".block_error").html("<div class='col-md-offset-1 text-left'><span style='color:red'>Заполните обязательные поля</span></div>"); } }) });