Limiting the file types to upload
NitishDeshpande opened this issue · comments
NitishDeshpande commented
What is the best way to limit the type of the file that can be uploaded? For example I want to allow users to upload *.docx and *.pdf only
Greg L. Turnquist commented
Right here => https://github.com/spring-guides/gs-uploading-files/blob/master/complete/src/main/java/hello/FileUploadController.java#L44-L53
You have the opportunity to screen for what is acceptable and plug in your own rules.