diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:42:52 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:42:52 -0500 |
commit | 074785cea106179cb3305637055ab0a009ca74f2 (patch) | |
tree | e6ae371cccd642aa2b67f39752a2cdf1fd4eb040 /files/pt-br/web/api/blob/size/index.html | |
parent | da78a9e329e272dedb2400b79a3bdeebff387d47 (diff) | |
download | translated-content-074785cea106179cb3305637055ab0a009ca74f2.tar.gz translated-content-074785cea106179cb3305637055ab0a009ca74f2.tar.bz2 translated-content-074785cea106179cb3305637055ab0a009ca74f2.zip |
initial commit
Diffstat (limited to 'files/pt-br/web/api/blob/size/index.html')
-rw-r--r-- | files/pt-br/web/api/blob/size/index.html | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/files/pt-br/web/api/blob/size/index.html b/files/pt-br/web/api/blob/size/index.html new file mode 100644 index 0000000000..f73f76dca2 --- /dev/null +++ b/files/pt-br/web/api/blob/size/index.html @@ -0,0 +1,60 @@ +--- +title: Blob.size +slug: Web/API/Blob/size +translation_of: Web/API/Blob/size +--- +<div>{{APIRef("File API")}}</div> + +<p>A propriedade <strong><code>Blob.size</code></strong> retorna o tamanho em bytes de {{domxref("Blob")}} ou um {{domxref("File")}}.</p> + +<h2 id="Syntaxe">Syntaxe</h2> + +<pre class="syntaxbox">var sizeInBytes = <em>blob</em>.size +</pre> + +<h3 id="Valor">Valor</h3> + +<p>Um número.</p> + +<h2 id="Exempl0">Exempl0</h2> + +<pre class="brush:js">// fileInput é um HTMLInputElement: <input type="file" multiple id="myfileinput"> +var fileInput = document.getElementById("myfileinput"); + +// files é um objeto FileList (similiar ao NodeList) +var files = fileInput.files; + +for (var i = 0; i < files.length; i++) { + console.log(files[i].name + " has a size of " + files[i].size + " Bytes"); +}</pre> + +<h2 id="Especificações">Especificações</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">Especificação</th> + <th scope="col">Status</th> + <th scope="col">Comentário</th> + </tr> + <tr> + <td>{{SpecName('File API', '#dfn-size', 'size')}}</td> + <td>{{Spec2('File API')}}</td> + <td>Definição inicial.</td> + </tr> + </tbody> +</table> + +<h2 id="Compatibilidade_com_navegadores">Compatibilidade com navegadores</h2> + +<div> + + +<p>{{Compat("api.Blob.size")}}</p> +</div> + +<h2 id="Veja_também">Veja também</h2> + +<ul> + <li>{{domxref("Blob")}}</li> +</ul> |