Skip to content

Instantly share code, notes, and snippets.

@maccevedor
Created July 7, 2014 21:47
Show Gist options
  • Save maccevedor/a69b3725e7bc91d9a130 to your computer and use it in GitHub Desktop.
Save maccevedor/a69b3725e7bc91d9a130 to your computer and use it in GitHub Desktop.
Aceptar un tipo definido de archivos con html5
<h1>Match all image files (image/*)</h1>
<p><label>image/* <input type="file" accept="image/*"></label></p>
<h1>Match all video files (video/*)</h1>
<p><label>video/* <input type="file" accept="video/*"></label></p>
<h1>Match all audio files (audio/*)</h1>
<p><label>audio/* <input type="file" accept="audio/*"></label></p>
<h1>Match all image files (image/*) and files with the extension ".someext"</h1>
<p><label>.someext,image/* <input type="file" accept=".someext,image/*"></label></p>
<h1>Match all image files (image/*) and video files (video/*)</h1>
<p><label>image/*,video/* <input type="file" accept="image/*,video/*"></label></p>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment