1. Check the type of file that is being uploaded (don’t just check file extension, sometimes malicious files with a .jpg, .png file extension). 2. Also, put restriction on the size of file user can upload Below is the link for your understanding [Link](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types)
Below is the link for your understanding
Link