I have written one jquery code of upload files with Web Handler. It works fine but i want to check if file's extension is not matching with my criteria than it will not allow to upload the file..
Here is my code
$(document).ready(function () {
var button = $('#fuAttachment'), interval;
$.ajax_upload(button, {
action: 'FileUploader.ashx',
name: 'myfile',
onSubmit: function (file, ext) {
if (ext == "js") {
alert(ext);
}
// this.disable();
},
onComplete: function (file, response) {
window.clearInterval(interval);
$('<li></li>').appendTo('.files').text(file);
}
});
});
I am getting the extension in ext variable.
I can check it also but still if file contain that extension than want to break upload operation.
How can i do this?? please help ME if anybody knows..
$.ajax_upload? Where does it come from? Custom written (if so, please show the code)? Third party upload plugin (if so please post a link to the website of the plugin)?jquery.ajax_upload.0.6.min.js. You can get it from this link