|

楼主 |
发表于 2016-3-17 18:46:59
|
显示全部楼层
public static void createVersionDoc(String docID,String docName) throws UnsupportedEncodingException, DocumentException, Exception{
Docs docs = new Docs();
Doc doc = docs.query(null, "/defaultDocNameSpace", null, null, null).get(docID);
File outPutFile =new File("c:/"+docName);
doc.download(new FileOutputStream(outPutFile));
DocUtils.lock(docID);
doc.setsDocName("手机拍照"+docName);
doc.upload(new File("c:/"+docName));
docs.createVersion();
outPutFile.delete();
}
用了这个方法,文件不能存到本地,也就上传不了,如果不上传的话,缓存里的图片是会丢掉的 |
|