Opened 8 years ago
Closed 7 years ago
#17116 closed defect (fixed)
/dojox/form/uploader don´t call onError on IFRAME
Reported by: | eduardogf | Owned by: | Mike Wilcox |
---|---|---|---|
Priority: | undecided | Milestone: | 1.9.3 |
Component: | DojoX Uploader | Version: | 1.9.0 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
On File dojox/form/uploader/_IFrame.js there is an incorret variable name on line cheking for error, so the OnError? is never called. In 1.8.3, the return variable was data and in 1.9.0 the return changed to result, but the test for error was not updated.
The Line:
if(data["ERROR"] || data["error"]){
Have to BE:
if(result["ERROR"] || result["error"]){
After the change the IFrame starts to work again in 1.9.0 as it should.
Bellow the Correct peace of code:
request.post(url, { form: sendForm, handleAs: "json", content: data }).then(function(result){ domConstruct.destroy(sendForm); if(result["ERROR"] || result["error"]){ self.onError(result); }else{ self.onComplete(result); } }, function(err){ console.error('error parsing server result', err); domConstruct.destroy(sendForm); self.onError(err); });
Change History (4)
comment:1 Changed 7 years ago by
comment:4 Changed 7 years ago by
Milestone: | tbd → 1.9.3 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
After four months the release 1.9.1, contain the same error.
Another BUG #17402 was open by another user to release 1.9.1.
It´s just a single line to correct, but the problem persists in 1.9.1.
So again we have to correct the code to use DOJO upload with IFRAME