Now, i use Blueimp jQuery File Upload to upload files. I have a question how can i upload in custom folder?. Example: with defaullt Blueimp jQuery File Upload will upload to folder server/php/files and server/php/files/thumbnail. I want to add custom param when upload and it will upload to this folder. Ex: i set it will up load to abc, file upload will upload to folder server/php/files/abc and server/php/files/thumbnail/abc. I had change data-url in input but it doesnt change More: in page A i will upload to folder abc,in page B i will upload to folder cde
<input id="fileupload" type="file" name="files[]" data-url="/assets/server/php/abc" multiple>
<script>
$(function () {
$('#fileupload').fileupload({
dataType: 'json',
add: function (e, data) {
data.context = $('<p/>').text('Uploading...').appendTo(document.body);
data.submit();
},
done: function (e, data) {
$.each(data.result.files, function (index, file) {
$('<p/>').text(file.name).appendTo(document.body);
console.log(file);
});
}
});
});
</script>