I have a signup process on my website which is create with laravel 5.3 and ajax , it is a three steps signup, the second step sometimes keep loading because of a file upload done with jQuery ajax , if I tried to use an image with big size as 5 mega the network tab in the inspect element gives me unprocessed entity
and if I tried a smaller one(in kB) on my localhost it upload normally
on my hosting vps godaddy server the problem is bigger , because If i tried to upload the image of size in (KB) from my device it works fine , but two users tried to create their accounts and when they uploaded their images and one of them tried to upload an image of size (200K) it didn't work with him but when he tried another one with size (10K) it worked
I apologize if the question is to long or naive , but any help would be appreciated
$('#fileUploadForm').ajaxForm({
beforeSubmit: function() {
$('#continue_two').html(' Loading...');
},
success: function() {
//$('#tabTwoFestival').show();
$('#continue_two').html('Save & Continue');
$('#errors_two').html("<div class='alert alert-success'>Added Successfully... Please Continue</div>");
},
error: function(error) {
//process validation errors here.
var errors = error.responseJSON; //this will get the errors response data.
//show them somewhere in the markup
//e.g
errorsHtml = '<div class="alert alert-danger"><ul>';
$.each(errors, function(key, value) {
errorsHtml += '<li>' + value[0] + '</li>'; //showing only the first error.
});
errorsHtml += '</ul></div>';
$('#errors_two').html(errorsHtml); //appending to a <div id="form-errors"></div> inside form
// alert(errorsHtml); //appending to a <div id="form-errors"></div> inside form
$('#continue_two').html('Save and Continue');
},
});
<script src="http://ift.tt/1qRgvOJ"></script>
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire