Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

max size input file html

$(`input[id='file-input']`).change(function (e)
{
  let file = e.target.files[0];
  if (file.size > 50000)
  {
    alert(`File too big max 50ko`);
    return null;
  }
}
 
PREVIOUS NEXT
Tagged: #max #size #input #file #html
ADD COMMENT
Topic
Name
9+5 =