How to upload multiple files using PHP, jQuery and AJAX

Finally I have found the solution by using the following code: $(‘body’).on(‘click’, ‘#upload’, function(e){ e.preventDefault(); var formData = new FormData($(this).parents(‘form’)[0]); $.ajax({ url: ‘upload.php’, type: ‘POST’, xhr: function() { var myXhr = $.ajaxSettings.xhr(); return myXhr; }, success: function (data) { alert(“Data Uploaded: “+data); }, data: formData, cache: false, contentType: false, processData: false }); return false; });

maxFileSize and acceptFileTypes in blueimp file upload plugin do not work. Why?

Had the same problem, and the blueimp guy says “maxFileSize and acceptFileTypes are only supported by the UI version” and has provided a (broken) link to incorporate the _validate and _hasError methods. So without knowing how to incorporate those methods without messing up the script I wrote this little function. It seems to work for … Read more

Can someone explain how to implement the jQuery File Upload plugin?

I was looking for a similar functionality some days back and came across a good tutorial on tutorialzine. Here is an working example. Complete tutorial can be found here. Simple form to hold the file upload dialogue: <form id=”upload” method=”post” action=”upload.php” enctype=”multipart/form-data”> <input type=”file” name=”uploadctl” multiple /> <ul id=”fileList”> <!– The file list will be … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)