Status: Unconfirmed
Owner: ----
Labels: Type-Bug Pri-2 OS-All Area-Misc

New issue 9102 by andrea.giammarchi: File does not expose both size and  
binary content
http://code.google.com/p/chromium/issues/detail?id=9102

Chrome Version       : 2.0.171.0 (12184)
URLs (if applicable) : any
Other browsers tested:
   Add OK or FAIL after other browsers where you have tested this issue:
      Safari 4: OK
   Firefox 3.x: OK
          IE 7: Not Suppoerted
          IE 8: Not Suppoerted

What steps will reproduce the problem?
1. Test case:
<input type="file" />
<script type="text/javascript">
Array.prototype.pop.call(
     document.getElementsByTagName("input")
).onchange = function(){
     var file = this.files.item(0);
     alert(file.fileSize);   // 0
};
</script>

What is the expected result?
The File length in bytes

What happens instead?
Returned value is always 0

Please provide any additional information below. Attach a screenshot if
possible.
Not sure if it is related, but when I try to send the file via
XMLHttpRequest the file binary content is not exposed using xhr.send(file).
Safari 4 beta exposes file content only in that way while FireFox provides
xhr.sendAsBinary plus file.getAsBinary methods (preferred and necessary to
send via boundary and be able to create the string with one or more files)

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/group/chromium-bugs
-~----------~----~----~----~------~----~------~--~---

Reply via email to