فهرست منبع

fix #604 display thumbnails

Shinsuke Sugaya 9 سال پیش
والد
کامیت
f786f771de

+ 1 - 1
src/main/assemblies/files/generate-thumbnail

@@ -8,7 +8,7 @@ if [ x"$CMD_TYPE" = "xmsoffice" ] ; then
   TARGET_FILE=`echo $URL | sed -e "s#^file:/*#/#g"`
   TARGET_FILE=`echo $URL | sed -e "s#^file:/*#/#g"`
   TMP_FILE=/tmp/thumbnail.$$.pdf
   TMP_FILE=/tmp/thumbnail.$$.pdf
   unoconv -o $TMP_FILE -f pdf $TARGET_FILE
   unoconv -o $TMP_FILE -f pdf $TARGET_FILE
-  convert -thumbnail 200x150! $TMP_FILE $OUTPUT_FILE
+  convert -thumbnail 160x120! $TMP_FILE $OUTPUT_FILE
   rm $TMP_FILE
   rm $TMP_FILE
 else
 else
   echo "Unsupported type: $CMD_TYPE"
   echo "Unsupported type: $CMD_TYPE"

+ 1 - 1
src/main/java/org/codelibs/fess/app/web/thumbnail/ThumbnailAction.java

@@ -72,8 +72,8 @@ public class ThumbnailAction extends FessSearchAction {
         final File thumbnailFile = thumbnailManager.getThumbnailFile(form.queryId, form.docId);
         final File thumbnailFile = thumbnailManager.getThumbnailFile(form.queryId, form.docId);
         if (thumbnailFile == null) {
         if (thumbnailFile == null) {
             // 404
             // 404
-            throw404("Thumbnail for " + form.docId + " is under generating.");
             thumbnailManager.generate(doc);
             thumbnailManager.generate(doc);
+            throw404("Thumbnail for " + form.docId + " is under generating.");
             return null;
             return null;
         }
         }
 
 

+ 1 - 1
src/main/java/org/codelibs/fess/thumbnail/impl/WebDriverGenerator.java

@@ -46,7 +46,7 @@ public class WebDriverGenerator extends BaseThumbnailGenerator {
 
 
     public int windowHeight = 800;
     public int windowHeight = 800;
 
 
-    public int thumbnailWidth = 400;
+    public int thumbnailWidth = 160;
 
 
     public String imageFormatName = "png";
     public String imageFormatName = "png";