Преглед на файлове

附件下载插件测试4

turborao преди 6 дни
родител
ревизия
1b2d7ddee3
променени са 1 файла, в които са добавени 4 реда и са изтрити 3 реда
  1. 4 3
      code/base/nckd-jimin-base-helper/src/main/java/nckd/base/helper/AttachmentDownloadListPlugin.java

+ 4 - 3
code/base/nckd-jimin-base-helper/src/main/java/nckd/base/helper/AttachmentDownloadListPlugin.java

@@ -66,12 +66,13 @@ public class AttachmentDownloadListPlugin extends AbstractListPlugin implements
             for (Map map : list) {
                 //String url = map.get("url").toString();//获取到url
                 String realUrl  = map.get("relativeUrl").toString();
+                String filename  = map.get("name").toString();
                 logger.info("SEC relativeUrl:" + realUrl);
                 FileService fileService = FileServiceFactory.getAttachmentFileService();
-                String path = FileServiceExtFactory.getAttachFileServiceExt().getRealPath(realUrl);
-                logger.info("SEC path:" + path);
+                //String path = FileServiceExtFactory.getAttachFileServiceExt().getRealPath(realUrl);
+                logger.info("SEC path:" + filename);
                 InputStream inputStream = fileService.getInputStream(realUrl);
-                String downloadUrl =  FileSECUtils.getFileUrlByEncodeSEC(path,inputStream);
+                String downloadUrl =  FileSECUtils.getFileUrlByEncodeSEC(filename,inputStream);
                 logger.info("SEC downloadUrl:" + downloadUrl);
                 this.getView().download(downloadUrl);
             }