Skip to content

Commit

Permalink
Type check fix
Browse files Browse the repository at this point in the history
  • Loading branch information
LuboKar committed May 17, 2024
1 parent 50e749f commit 7dec03f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ private void csvVerification(MultipartFile file) {
throw new MultipartFileNotSelectedException();
}

if (!file.getContentType().equals("text/csv")) {
if (file.getContentType() == null || !file.getContentType().equals("text/csv")) {
throw new MultipartFileContentTypeException("Only CSV files are allowed");
}
}
Expand Down

0 comments on commit 7dec03f

Please sign in to comment.