Merge branch 'missBesoin1' into 'main'

missPNG

See merge request pdl-l3/teams/2023/v1/v1d!12
This commit is contained in:
Theophyl Hoguet committed 2023-03-13 23:43:09 +01:00
commit cc41d8bc10
1 file changed
+1 -1
@@ -66,7 +66,7 @@ public class ImageController {
String contentType = file.getContentType(); String contentType = file.getContentType();
if (contentType != null && !contentType.equals(MediaType.IMAGE_JPEG.toString())) { 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 { try {
imageDao.create(new Image(file.getOriginalFilename(), file.getBytes())); imageDao.create(new Image(file.getOriginalFilename(), file.getBytes()));