A servlet is configured to allow only specific file types for upload. What strategies should be implemented to ensure this?

  • Rely on the web browser for file type validation
  • Use a third-party library for file type validation
  • Validate file types on the client side
  • Validate file types on the server side
Validating file types on the server side is a more secure approach to ensure that only specific file types are allowed for upload. Relying solely on client-side validation can be bypassed, so it's not recommended. Using a third-party library can also provide robust validation.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *