Opened 6 years ago

Closed 5 years ago

#17632 closed defect (worksforme)

Not possible to send file metadata using dojox.form.Uploader

Reported by: Denis Rykov Owned by: Denis Rykov
Priority: low Milestone: 1.10
Component: DojoX Uploader Version: 1.9.2
Keywords: Cc:
Blocked By: Blocking:

Description

Not possible to send file's metadata (name, size, type) if use dojox.form.Uploader with uploadOnSelect option while uploading multiple files. Now only first file metadata sends to the server because _HTML5.js file contains the following code:

if(this.uploadOnSelect){
    this.connect(this, "onChange", function(data){
        this.upload(data[0]);
    });
}

Where data is list of objects which contains file's metadata.

Change History (6)

comment:1 Changed 6 years ago by bill

Component: DojoX FormDojoX Uploader

comment:2 Changed 6 years ago by dylan

Milestone: tbd1.10
Owner: set to dylan
Priority: undecidedlow
Status: newassigned

comment:3 Changed 5 years ago by dylan

If I had time I would completely refactor this code to use modern Dojo best practices, instead of a sort of mix of pre-AMD and AMD.

That said, it looks like all that is needed here is:

if(this.uploadOnSelect){
    this.connect(this, "onChange", function(data){
        this.upload(data);
    });
}

Does that seem correct?

comment:4 Changed 5 years ago by dylan

Owner: changed from dylan to Denis Rykov
Status: assignedpending

I've gone through the various tests, and modified some of them to use the uploadOnSelect flag, and they seem to upload fine and post the relevant metadata.

Can you please provide a testcase that shows otherwise? https://github.com/dojo/dojox/pull/98 is a minor patch to clean-up the tests to try and solve this issue, but I'm not seeing the reported bug as I see all metadata sent across the wire.

comment:5 Changed 5 years ago by dylans <dylan@…>

In bec05d5b2f3ee51c5b664cae45ff6f7323793981/dojox:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:6 Changed 5 years ago by dylan

Resolution: worksforme
Status: pendingclosed
Note: See TracTickets for help on using tickets.