0

enter image description here

This upload option are allowing all type of file like that jpg,png,docx,exe. But i would allow permission only jpg,png file type in javascript.Also i display a alert message when user submit send it to server button.I have a server check for this type of image validation.But i would give a javascript validation. Thanks in advance

zaman
  • 115
  • 7
  • You can start by adding `accept=".png,.jpg"` to the FileUpload. A user will then only see those type of files. He/she can then still select "all files" and select another type, but this will help 95% of the users select the right file. – VDWWD Aug 01 '18 at 06:45
  • Possible duplicate of [Validation of file extension before uploading file](https://stackoverflow.com/questions/4234589/validation-of-file-extension-before-uploading-file) – VDWWD Aug 01 '18 at 06:47
  • I have faced this problem in FCkeditor. So your solution is applicable for normal jabascript image upload problem. – zaman Aug 01 '18 at 06:59

0 Answers0