I’m using jQuery file upload plugin
i have read all the docs provided. there is a php integration class but the class is so complicated and not commented at all i just want how to receive the JSON Data and response to the plugin.
because i want a simple implementation just receive the $_FILES array and upload files with move uploaded files. this is the simple plugin:
$('#fileupload').fileupload({
dataType: 'json',
done: function (e, data) {
$.each(data.result, function (index, file) {
$('<p/>').text(file.name).appendTo(document.body);
});
}
});
and the html is:
<input id="fileupload" type="file" name="files[]" data-url="server/php/" multiple>
the question is how to receive the $_FILES array from this plugin and response to it ???
please could someone help me? just a simple code snippet and i will do the rest
Ok, getting the data on the php-side:
This should be something like:
If it doesn’t work (in your php handler):
The output is written to the error log of your server. It should look somewhat like:
You will have to walk the array of $_FILES and move each one to where to store it…