GuitarGod Posted March 15, 2015 Share Posted March 15, 2015 Hi all, I'm currently using jQuery to upload multiple images, however, sometimes we're uploading 50+ images and each image is copied/resized to a thumbnail on upload, so we're breaching out max execution time among other things. Is it possible to alter jQuery to send each image individually thus keeping within our execution time and allowing us to track progress on each individual upload. So far we have: $( document ).on( 'submit', 'form[name="upload"]', function() { var data = new FormData( this ); $.ajax({ type : 'POST', url : 'upload.php', async : false, cache : false, contentType : false, processData : false, data : data, success : function( response ) { alert( response ); } }); return false; }); HTML is pretty much: <form name="upload" enctype="multipart/form-data"> <input type="file" id="file_upload" name="file_upload[]" multiple><br> <input type="submit" value="Upload"></form> Any help would be appreciated. Cheers! Quote Link to comment https://forums.phpfreaks.com/topic/295254-upload-multiple-images-but-send-them-separately/ Share on other sites More sharing options...
requinix Posted March 16, 2015 Share Posted March 16, 2015 (edited) You could just alter the execution time: figure out how long a single image should take and multiply that by the number of images (then add a bit more just in case), change the time limit accordingly, and do your work. Processing multiple images at once will be a bit faster than each one individually, though I wouldn't expect there to be that huge of a difference. Edited March 16, 2015 by requinix Quote Link to comment https://forums.phpfreaks.com/topic/295254-upload-multiple-images-but-send-them-separately/#findComment-1508178 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.