diff options
author | Peter Bengtsson <mail@peterbe.com> | 2021-07-15 12:59:34 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-15 12:59:34 -0400 |
commit | 3601b7bb982e958927e069715cfe07430bce7196 (patch) | |
tree | d305ecdbf80ce8126386a0d7886f70d915277c7c /files/es/web/api/file | |
parent | 9ace67d06f2369e3c770e3a11e06e1c8cc9f66fd (diff) | |
download | translated-content-3601b7bb982e958927e069715cfe07430bce7196.tar.gz translated-content-3601b7bb982e958927e069715cfe07430bce7196.tar.bz2 translated-content-3601b7bb982e958927e069715cfe07430bce7196.zip |
delete pages that were never translated from en-US (es, part 1) (#1547)
Diffstat (limited to 'files/es/web/api/file')
-rw-r--r-- | files/es/web/api/file/type/index.html | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/files/es/web/api/file/type/index.html b/files/es/web/api/file/type/index.html deleted file mode 100644 index b433446aa4..0000000000 --- a/files/es/web/api/file/type/index.html +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: File.type -slug: Web/API/File/type -tags: - - API - - Archivos - - File API - - Propiedad - - Referencia - - Tipo de archivo -translation_of: Web/API/File/type ---- -<div>{{APIRef("File API")}}</div> - -<p>Retorna el tipo de media (<a href="/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types">MIME</a>) del archivo representado por un objeto {{domxref("File")}}.</p> - -<h2 id="Sintaxis">Sintaxis</h2> - -<pre class="brush: js">var tipo = <var>file</var>.type;</pre> - -<h2 id="Valor">Valor</h2> - -<p>Una cadena (<em>string</em>), conteniendo el tipo de media (MIME) indicando el tipo del archivo, por ejemplo "image/png" para imágenes PNG.</p> - -<h2 id="Ejemplo">Ejemplo</h2> - -<pre class="brush: html"><input type="file" multiple onchange="mostrarTipo(this)"> -</pre> - -<pre class="brush: js">function mostrarTipo(fileInput) { - const archivos = fileInput.files; - - for (let i = 0; i < archivos.length; i++) { - const nombre = archivos[i].name; - const tipo = archivos[i].type; - alert("Nombre del archivo: " + nombre + " , Tipo: " + tipo); - } -}</pre> - -<p><strong>Note:</strong> Based on the current implementation, browsers won't actually read the bytestream of a file to determine its media type. It is assumed based on the file extension; a PNG image file renamed to .txt would give "<em>text/plain</em>" and not "<em>image/png</em>". Moreover, <code>file.type</code> is generally reliable only for common file types like images, HTML documents, audio and video. Uncommon file extensions would return an empty string. Client configuration (for instance, the Windows Registry) may result in unexpected values even for common types. <strong>Developers are advised not to rely on this property as a sole validation scheme.</strong></p> - -<h2 id="Especificaciones">Especificaciones</h2> - -<table class="standard-table"> - <thead> - <tr> - <th scope="col">Especificación</th> - <th scope="col">Estado</th> - <th scope="col">Comentario</th> - </tr> - </thead> - <tbody> - <tr> - <td>{{SpecName('File API', '#dfn-type', 'type')}}</td> - <td>{{Spec2('File API')}}</td> - <td>Definición inicial.</td> - </tr> - </tbody> -</table> - -<h2 id="Compatibilidad_de_los_navegadores">Compatibilidad de los navegadores</h2> - - - -<p>{{Compat("api.File.type")}}</p> - -<h2 id="Ver_también">Ver también</h2> - -<ul> - <li><a href="/en-US/docs/Web/API/File/Using_files_from_web_applications">Usando archivos desde aplicaciones web (Using files from web applications)</a></li> - <li>Blog Post: <a href="https://textslashplain.com/2018/07/26/be-skeptical-of-client-reported-mime-content-types/">Se excéptico de tipos MIME reportados por el cliente (Be skeptical of client-reported MIME types)</a></li> -</ul> |