I am trying to extend the basic functionality of this gem. The basic functionality works well. What I am trying to do:
:javascript
var filepicker = filepicker.setKey('my key');
function check_mimetype(file_data){
filepicker.get_file('image/*', function(file_data.url, file_data.mimytype){ #error pointing here
...
});
}
But I always get this error:
Uncaught SyntaxError: Unexpected token .
I don't know what can be wrong - Filepicker's key is added, Filepicker's JS library is loaded... This data are in the file _form.html.haml. (jQuery is obviously loaded as well)
Any ideas what's wrong?
Thank you