xiongzhu 4 rokov pred
rodič
commit
bdd13616f1

+ 1 - 1
src/main/java/com/izouma/nineth/web/FileUploadController.java

@@ -161,7 +161,7 @@ public class FileUploadController {
             ImageIO.write(img, ext, os);
             InputStream is = new ByteArrayInputStream(os.toByteArray());
             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) {
                 height = Integer.MAX_VALUE;
             } else if (width == null) {