|
@@ -161,7 +161,7 @@ public class FileUploadController {
|
|
|
ImageIO.write(img, ext, os);
|
|
ImageIO.write(img, ext, os);
|
|
|
InputStream is = new ByteArrayInputStream(os.toByteArray());
|
|
InputStream is = new ByteArrayInputStream(os.toByteArray());
|
|
|
url = storageService.uploadFromInputStream(is, path);
|
|
url = storageService.uploadFromInputStream(is, path);
|
|
|
- } else if (width != null || height != null) {
|
|
|
|
|
|
|
+ } else if (Pattern.matches("(jpg|png)", ext) && (width != null || height != null)) {
|
|
|
if (height == null) {
|
|
if (height == null) {
|
|
|
height = Integer.MAX_VALUE;
|
|
height = Integer.MAX_VALUE;
|
|
|
} else if (width == null) {
|
|
} else if (width == null) {
|