javascript file api not working properly.

Bug #1292787 reported by mdimtiaj
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Midori Web Browser
Invalid
Undecided
Unassigned

Bug Description

i tried this script to determine input file size. and it returned horrible result.

<input type="file" id="files" name="files[]" multiple />
<output id="list"></output>

<script>
  function handleFileSelect(evt) {
    var files = evt.target.files; // FileList object

    // files is a FileList of File objects. List some properties.
    var output = [];
    for (var i = 0, f; f = files[i]; i++) {
      output.push('<li><strong>', escape(f.name), '</strong> (', f.type || 'n/a', ') - ',
                  f.size, ' bytes, last modified: ',
                  f.lastModifiedDate ? f.lastModifiedDate.toLocaleDateString() : 'n/a',
                  '</li>');
    }
    document.getElementById('list').innerHTML = '<ul>' + output.join('') + '</ul>';
  }

  document.getElementById('files').addEventListener('change', handleFileSelect, false);
</script>

i want to try it at mysite http://www.boysofts.com/

Revision history for this message
gue5t gue5t (gue5t) wrote :

Can you please give your OS and software versions (from about:version)? If you're on Windows, this may be <https://bugs.webkit.org/show_bug.cgi?id=129216>.

Changed in midori:
status: New → Incomplete
Changed in midori:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.