Opened 10 years ago

Closed 9 years ago

#10480 closed enhancement (fixed)

Improvement of dojox.form.FileUploader

Reported by: Eric Pasquier Owned by: Mike Wilcox
Priority: high Milestone: 1.5
Component: DojoX Form Version: 1.4.0b
Keywords: Cc:
Blocked By: Blocking:

Description

In the html version of the FileUploader?, the file list display a 0kb size file. This is due to the fact that <input type="file" /> doesn't have any filesize information, but this make confusion to users. I suggest not to display it by changing these lines (around line 904) :

Actual:

_addToFileList: function(){
 - - -
  str += '<table id="file_'+d.name+'" class="fileToUpload"><tr><td class="fileToUploadClose"></td><td class="fileToUploadName">'+d.name+'</td><td class="fileToUploadSize">'+Math.ceil(d.size*.001)+'kb</td></tr></table>'	
}, this);
- - -

Suggested:

_addToFileList: function(){
  - - -
  str += '<table id="file_' + d.name + '" class="fileToUpload"><tr><td class="fileToUploadClose"></td><td class="fileToUploadName">' + d.name + '</td><td class="fileToUploadSize">';

if (d.size>0)
   str += Math.ceil(d.size*.001)+'kb';

str += '</td></tr></table>';
}, this);
- - -

The idea is not display the 'd.size' parameter.

Change History (2)

comment:1 Changed 10 years ago by Adam Peller

Owner: changed from dante to Mike Wilcox

comment:2 Changed 9 years ago by Mike Wilcox

Milestone: tbd1.5
Resolution: fixed
Status: newclosed

Fixed with commit 21401.

Note: See TracTickets for help on using tickets.