Browse Source

Update warn log for unsupported image media types

pull/9542/head
ViacheslavKlimov 3 years ago
parent
commit
e35a6cb5a5
  1. 3
      dao/src/main/java/org/thingsboard/server/dao/util/ImageUtils.java

3
dao/src/main/java/org/thingsboard/server/dao/util/ImageUtils.java

@ -105,9 +105,10 @@ public class ImageUtils {
preview.setData(null);
preview.setSize(data.length);
image.setPreview(preview);
log.debug("Couldn't parse {} ({}) with ImageIO, got width {} and height {} from metadata", mediaType, dir.getName(), width, height);
log.warn("Couldn't process {} ({}) with ImageIO, leaving preview as original image", mediaType, dir.getName());
return image;
}
log.warn("Image media type {} not supported", mediaType);
throw new IllegalArgumentException("Media type " + mediaType + " not supported");
}

Loading…
Cancel
Save