Uploading More than 1000 Image
Uploading More than 1000 Image
Matz
Posts: 4Questions: 2Answers: 0
User select multiple transaction like the picture below and then upload 5 image so per transaction X 5 if they select 1000 transaction its equivalent of 5000 image. My problem is I get a error “Maximum execution time of 30 seconds exceeded”, I resolve it by editing php.ini and put this max_execution_time = 3000, but still I get a error.
here's my code in uploading
$.ajax({
type: 'PUT',
url: "{{ url(config('laraadmin.adminRoute') . '/update_occ_multi') }}",
data: data_value,
dataType: "json",
success: function (data) {
success(output);
var html = '<div class="alert '+data.status+'" role="alert" id="alert-show"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>'+data.msg+'</div>';
$('#success_message').fadeIn().html(html);
setTimeout(function(){
$('#success_message').fadeOut(1000);
}, 5000);
},
});
This question has accepted answers - jump to:
This discussion has been closed.
Answers
I had a similar issue with using the CSV Import example. I created a batch upload process on the client side to fix my issue. Here is the [thread]https://datatables.net/forums/discussion/comment/165164/#Comment_165164) that discusses what I did. Hope it helps.
Kevin
Agreed - you'd almost certainly need to break it down into smaller actions. You may need to profile the server-side script as well to see if there are any optimisation that can be made. For example if all 1000 records are getting the same files, you might be able to do a batch update or insert (depending on your db structure), rather than needing to do a db call per row (which is probably what is causing the timeout).
Allan