plupload icon indicating copy to clipboard operation
plupload copied to clipboard

StateChanged not firing when using flash and under certain conditions

Open LeandroJF opened this issue 14 years ago • 1 comments

Posting as a issue as I don't know how to create a pull request.

When using flash runtime, with resize and you're trying to upload an image with a big size, for example,

http://en.wikipedia.org/wiki/File:Whole_world_-_land_and_oceans_12000.jpg

24000x12000 pixels

or a corrupt image (renaming an exe to jpeg) and this image is the last in the queue, it is not triggering the statechanged event because an error is ocurring at line 226 on plupload.flash.js:

uploader.bind("CancelUpload", function() {
    getFlashObj().cancelUpload();
});

so my solution is to put this inside a try catch:

uploader.bind("CancelUpload", function() {
    try {
        getFlashObj().cancelUpload();
    } catch (err) {
    }
});

maybe you have a better solution, but this worked fine to me. Regards

LeandroJF avatar Apr 04 '12 19:04 LeandroJF

forget about it, this error was ocurring on plupload 1.5.2 package, but it's not happening anymore with the code on git.

LeandroJF avatar Apr 04 '12 21:04 LeandroJF