Skip to content
This repository was archived by the owner on Mar 27, 2026. It is now read-only.
This repository was archived by the owner on Mar 27, 2026. It is now read-only.

Error: Error calling method on NPObject. #28

Open

Description

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'
});

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions