From 3019fe0d34f6761600bece92d1cc3d287d2527f2 Mon Sep 17 00:00:00 2001 From: John Niang Date: Sat, 6 Mar 2021 01:10:52 +0800 Subject: [PATCH] Make more tolerant of reading image (#1298) --- src/main/java/run/halo/app/handler/file/LocalFileHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/run/halo/app/handler/file/LocalFileHandler.java b/src/main/java/run/halo/app/handler/file/LocalFileHandler.java index 3d82fd161e..c081b21d2f 100644 --- a/src/main/java/run/halo/app/handler/file/LocalFileHandler.java +++ b/src/main/java/run/halo/app/handler/file/LocalFileHandler.java @@ -152,7 +152,7 @@ public UploadResult upload(MultipartFile file) { // Set thumb path return thumbnailSubFilePath; } - } catch (IOException e) { + } catch (Throwable e) { log.warn("Failed to open image file.", e); } return subFilePath;