Browse Source

附件下载插件测试4

turborao 6 days ago
parent
commit
1b2d7ddee3

+ 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);
             }