I'm using the plugin qq.FileUploader.
Before submitting file, I want to know if a file with the same name has already been upload.
I'm using this code:
var uploader = new qq.FileUploader({
element: document.getElementById('file-uploader-requestDocuments'),
action: '<%: Url.Action("Create", "RequestDocument") %>',
params: { id: $('#RequestTempUploadFolderID').val() },
sizeLimit: 10520000,
onSubmit: function (id, fileName)
$('#file-uploader-requestDocuments').find('.qq-upload-file').each(function () {
if ($(this).text() == fileName) {
return false;
return true;
});
}
});
The return false is correct, but it does not stop the submit!
How stop the file upload, and there is a better way to get the file already uploaded?