This commit is contained in:
Theophyl Hoguet committed 2023-03-13 23:38:43 +01:00
1 parent 3d076e21d3
commit 25f4877de2
1 file changed
+1 -1
@@ -66,7 +66,7 @@ public class ImageController {
String contentType = file.getContentType();
if (contentType != null && !contentType.equals(MediaType.IMAGE_JPEG.toString())) {
return new ResponseEntity<>("Only JPEG file format supported", HttpStatus.UNSUPPORTED_MEDIA_TYPE);
return new ResponseEntity<>("Only JPEG/PNG file format supported", HttpStatus.UNSUPPORTED_MEDIA_TYPE);
}
try {
imageDao.create(new Image(file.getOriginalFilename(), file.getBytes()));