Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pasting from Excel with jQuery File Upload on page causes upload

To boil it down, I have two inputs on the page. One is a text input, the other is a file input. If I copy and paste an Excel spreadsheet cell to the text input, it triggers a file upload to the file input. I'd like to allow copy-paste without triggering the file upload.

like image 665
Jonathan Mui Avatar asked Jan 07 '15 00:01

Jonathan Mui


1 Answers

The key here is to set the pasteZone to null

$("#fileupload").fileupload({
    pasteZone: null   //make it $(document) or specific container for enabling it
})

Documentation

Credit

like image 70
Jonathan Mui Avatar answered Nov 15 '22 09:11

Jonathan Mui