|
@@ -103,17 +103,19 @@ public class DefaultPreviewCusServiceImpl extends DefaultPreviewServiceImpl impl
|
|
|
*/
|
|
|
@Override
|
|
|
public Map<String, Object> previewWPS(String fileName, String path, String userAgent, Map<String, String> config) {
|
|
|
- path = DecodeFileFactory.getDecodeService().getDecodeFilePath(path);
|
|
|
- path = path.replaceAll("//", "/");
|
|
|
- InputStream in = null;
|
|
|
- new HashMap();
|
|
|
- Map<String, Object> previewResult = new HashMap(3);
|
|
|
String ext = fileName.substring(fileName.lastIndexOf(46) + 1);
|
|
|
- long startTime = 0L;
|
|
|
- long endTime = 0L;
|
|
|
- Map result;
|
|
|
+
|
|
|
// txt
|
|
|
if (YunHomeService.isNotNeedDeal(ext)) {
|
|
|
+ path = DecodeFileFactory.getDecodeService().getDecodeFilePath(path);
|
|
|
+ path = path.replaceAll("//", "/");
|
|
|
+ InputStream in = null;
|
|
|
+ new HashMap();
|
|
|
+ Map<String, Object> previewResult = new HashMap(3);
|
|
|
+
|
|
|
+ long startTime = 0L;
|
|
|
+ long endTime = 0L;
|
|
|
+ Map result;
|
|
|
Map<String, String> headerMap = new HashMap();
|
|
|
if (userAgent != null) {
|
|
|
headerMap.put("USER-AGENT", userAgent);
|
|
@@ -137,6 +139,8 @@ public class DefaultPreviewCusServiceImpl extends DefaultPreviewServiceImpl impl
|
|
|
return previewResult;
|
|
|
} else {
|
|
|
// 需要转换
|
|
|
+ logger.info("--------------previewWPS 需要转换, filename:" + fileName + "," + path + "," + userAgent);
|
|
|
+
|
|
|
return super.preview(fileName, path, userAgent);
|
|
|
}
|
|
|
}
|