DEV Community

Discussion on: How To Only Accept Images using HTML

Collapse
 
lexlohr profile image
Alex Lohr

In any case, you should also make sure that the server will enforce format/size requirements itself, since an attacker could attempt to programmatically initiate the upload to add wrong formats intended to be misinterpreted by your server or files that are too large in order to cause a denial-of-service (DoS).

Collapse
 
codeanddeploy profile image
Code And Deploy

Yes.. another validation in backend.