javascript - MVC FileUpload file size client side validation -
how can validate file size client side. can controlled via controller like,
if (file.contentlength > 1048600) { } on client side can control name , extension of file. how control size?
<input type="file" name="file" id="file" />
thanks
i dont think there cross browser way want, check question
this can work in webkit based browsers example
var size = document.getelementbyid('file').files[0].size;
Comments
Post a Comment