Diese Übersetzung ist unvollständig. Bitte helfen Sie, diesen Artikel aus dem Englischen zu übersetzen.
Summary
Returns the size of the file in bytes.
Syntax
var filesize = instanceOfFile.size
Value
A number.
Example
// fileInput is a HTMLInputElement:
var fileInput = document.getElementById("myfileinput");
// files is a FileList object (simliar to NodeList)
var files = fileInput.files;
for (var i = 0; i < files.length; i++) {
alert(files[i].name + " has a size of " + files[i].size + " Bytes");
}
Specifications
| Specification | Status | Comment |
|---|---|---|
| File API Die Definition von 'size' in dieser Spezifikation. |
Arbeitsentwurf | Initial definition. |
Browser compatibility
| Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
|---|---|---|---|---|---|
| File.name | 5 | Unknown (4) | 10.0 | 11.10 | 5.1 |
| Feature | Android | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|
| File.name | Nicht unterstützt | Nicht unterstützt | Nicht unterstützt | Nicht unterstützt | Nicht unterstützt |