I am building a function to read from a file input using jQuery. I have gotten the function working, however I am receiving a syntax warning in the console. Here is my code:
function (el) {
function () {
var file = el.files[0];
if (file) {
read = new FileReader();
read.readAsDataURL(file);
}
return read.result;
}
}
It appears the error is occurring due to the code on line 3 function () {, and the error reads:
Uncaught SyntaxError: Unexpected token (
Any ideas?
functionwhich is anyway not called?