I wonder if it's possible to create a percentage in Ajax requests. For example: When the form is submitted it starts with 0% up to 100% (when complete)
My ajax:
index.php
<script src="jquery.js"></script>
<script>
$(function()
{
$('form').submit(function(e)
{
e.preventDefault();
var formData = new FormData();
formData.append('image', $('#file').prop('files')[0]);
$.ajax({
url: 'upload.php',
data: formData,
type: 'post',
success: function(response)
{
console.log(response)
},
processData: false,
cache: false,
contentType: false
});
});
});
</script>
<form method="post" enctype="multipart/form-data">
<input type="file" id="file" />
<input type="submit" />
</form>