|
楼主 |
发表于 2020-8-13 09:41:40
|
显示全部楼层
本帖最后由 doreamon 于 2020-8-13 09:43 编辑
附件上出后,字段自动存值为
[{"docID":"C904AFF125F00001507E121E12431902",
"docName":"问题会议纪要.pdf",
"size":"69488",
"docPath":"/defaultDocNameSpace",
"fileID":"1122843-defaultDocNameSpace",
"time":"2020-08-12T18:51:53.548Z"}]
使用一下代码,获取不到文件信息,报错如图
Docs docs = new Docs();
Doc doc = docs.query(null, "/defaultDocNameSpace", null, null, null).get("C904AFF125F00001507E121E12431902");
String docName = doc.getsDocName();
System.out.println("docName:"+docName+"\r\n");
String newFileName = "22."+docName.split("\\.")[1];
System.out.println("doc3:"+doc+"\r\n");
File outPutFile =new File("D:/"+newFileName);
System.out.println("outPutFile:"+outPutFile+"\r\n");
doc.download(new FileOutputStream(outPutFile));
是哪里有问题呢
|
|