Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jquery fileuploader - disable upload when pasted - 'fileuploadpaste' - How?

When even I paste any image(on a text input box for example), it is getting uploaded by jquery file uploader.
So, how to stop this?

From the options page(https://github.com/blueimp/jQuery-File-Upload/wiki/Options), the event that is triggered after paste is 'fileuploadpaste'.

Normal jquery event fired after text paste is 'textInput'.

So, how to disable this upload ?

like image 709
user1305989 Avatar asked May 06 '14 10:05

user1305989


1 Answers

We can simply disable that like this:

$("#fileupload").fileupload({
    pasteZone: null   //make it $(document) or specific container for enabling it
})
like image 81
user1305989 Avatar answered Oct 23 '22 19:10

user1305989