I've split out the image scaling code into a separate class and returned this class...
[mir.git] / source / mircoders / media / MediaHandlerImagesExtern.java
index 6b50ef5..bb00c94 100755 (executable)
@@ -95,12 +95,7 @@ public class MediaHandlerImagesExtern extends MediaHandlerGeneric {
         if (dir!=null && !dir.exists()){
           dir.mkdirs();
         }
-        try {
-          processor.writeScaledData(iconFile, "JPEG");
-        }
-        catch (IOException e) {
-          throw new MediaFailure(e);
-        }
+        processor.writeScaledData(iconFile, "JPEG");
 
         anImageEntity.setFieldValue("img_height",
             Integer.toString(processor.getHeight()));
@@ -117,6 +112,8 @@ public class MediaHandlerImagesExtern extends MediaHandlerGeneric {
         anImageEntity.setFieldValue("publish_path", filePath);
 
         anImageEntity.update();
+        reportChange(iconStoragePath);
+        reportChange(imageFilePath);
       }
   }