Merge branch 'missBesoin1' into 'main'
missPNG See merge request pdl-l3/teams/2023/v1/v1d!12
This commit is contained in:
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()));
|
||||||
|
|||||||
Reference in new issue
Block a user