Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Error calling method on NPObject. #28

Open
ghost opened this issue Jan 26, 2013 · 0 comments
Open

Error: Error calling method on NPObject. #28

ghost opened this issue Jan 26, 2013 · 0 comments

Comments

@ghost
Copy link

ghost commented Jan 26, 2013

I use readAsDataURL to add preview image before crop/upload. I encoutoured "Error: Error calling method on NPObject." with Chrome 24.0 and the same error with FF 18.0.1 said "Error in Actionscript. Use a try/catch block to find error."

Capture d e cran 2013-01-26 a 14 21 36

This is my code :

YmpCropper.prototype.processPreview = function(files) {
var file, reader;
try {
file = files[0];
this.validateFile(file);
reader = new FileReader();
reader.preview_div = this.preview_div;
reader.img_tag = this.img_tag;
reader.cover_height = this.cover_height;
reader.onload = this.updateCover;
return reader.readAsDataURL(file);
} catch (error) {
return this.displayError(error);
}
};

$('#fileReader').fileReader({
id: 'fileReader',
filereader: 'cropper/filereader.swf',
expressInstall: 'cropper/expressInstall.swf'
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants