knownasilya / ember-plupload

Ember component for handling uploads using plupload
MIT License
87 stars 53 forks source link

Some javascript error when I upload big size image or other than image files #88

Closed gauravjain028 closed 7 years ago

gauravjain028 commented 7 years ago

When I upload a big size image or other type of files(like php, txt etc), i get below error

Uncaught TypeError: (("You cannot set `" + this) + ".isDestroyed` directly, please use ").destroy is not a function
    at Class.set [as isDestroyed] (ember.debug.js:36215)
    at Class.onError (upload-queue.js:284)
    at Backburner.run (ember.debug.js:717)
    at Backburner.join (ember.debug.js:743)
    at Function.run.join (ember.debug.js:22289)
    at plupload.Uploader.<anonymous> (ember.debug.js:22352)
    at plupload.Uploader.dispatchEvent (plupload.dev.js:2075)
    at plupload.Uploader.trigger (moxie.js:2067)
    at plupload.Uploader.<anonymous> (plupload.dev.js:673)
    at Array.<anonymous> (plupload.dev.js:1907)

This error is generating from the code https://github.com/tim-evans/ember-plupload/blob/master/addon/system/upload-queue.js#L281

BennyAlex commented 7 years ago

I get this error when I upload an file and the backend returns an 422 error + errormessage

tim-evans commented 7 years ago

Ahh, probably shouldn't be calling this on a destroyed object. A PR is welcome to fix

BennyAlex commented 7 years ago

PR created :D

tim-evans commented 7 years ago

🎉

tim-evans commented 7 years ago

I'll deploy later! Thanks for the PR!

BennyAlex commented 7 years ago

np, you can close this issue