#10559 closed defect (fixed)
2 Issues with dojox.form.FileUploader and uploadOnChange
Reported by: | Josh Trutwin | Owned by: | Mike Wilcox |
---|---|---|---|
Priority: | high | Milestone: | 1.5 |
Component: | DojoX Form | Version: | 1.4.0 |
Keywords: | FileUploader uploadOnChange postData | Cc: | |
Blocked By: | Blocking: |
Description
The following issues only occur if uploadOnChange is set to true and you have a Flash uploader (not HTML):
If you have uploadOnChange set to true for a flash uploader, the current code calls this in _change() function:
if(this.uploadOnChange){ this._buildFileInput(); this.upload(); }else ....
The problem is this._buildFileInput silently fails at this step:
this._formNode.appendChild(this._fileInput);
because this._formNode is undefined.
I fixed it by doing this:
if(this.uploadOnChange){ if(this.uploaderType == "html"){ this._buildFileInput(); } this.upload(); }else ....
More problematic though is that postData does not seem to get sent for a flash uploader with uploadOnChange true. I debuged the param from this line:
this.flashMovie.doUpload(this.postData);
The data is being sent to the flashMovie object just fine. Set uploadOnChange to false and call upload() manually and works fine.
Tested with 1.4.0 - the first problem I noticed the code is the same in trunk.
Change History (3)
comment:1 Changed 11 years ago by
Owner: | changed from dante to Mike Wilcox |
---|
comment:2 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:3 Changed 11 years ago by
Milestone: | tbd → 1.5 |
---|
@trutwijd: Good bug report and good suggestion for fix. Thanks.
(In [21402]) Fixes #10559 - Fixed uploadOnChange bug. Also fixed paths in UploadFile?.php to point to tests dir.