云创智企(cloudkd.com.cn)网盘集成服务
集成方式:
bropen.framework.resource.attachment.storage.clazz = CloudkdService.name
bropen.framework.resource.attachment.storage.cloudkd.saveas = 是否可以另存为
bropen.framework.resource.attachment.storage.cloudkd.account = 上面创建的用户名
bropen.framework.resource.attachment.storage.cloudkd.catalogid = 上面记录的文件夹ID
bropen.framework.resource.attachment.storage.cloudkd.url = 网盘服务器地址(如 http://xxxx:xxx)
bropen.framework.resource.attachment.storage.cloudkd.ssourl = 网盘单点登录 API 的地址后缀(默认为 /api/user/loginSSO)
。| Type | Name and description |
|---|---|
ErrorService |
errorService |
| Type | Name and description |
|---|---|
Integer |
delete(List<String> saveNames, List<String> syncIds)删除网盘文件 |
boolean |
exists(String saveName, String syncId) |
protected String |
getAccount() |
protected String |
getCatalogId()用户 account(bropen) 的附件同步文件夹的 ID |
EncodedInputStreamWrapper |
getEncodedInputStream(javax.servlet.http.HttpServletRequest request, String saveName, String syncId) |
java.io.InputStream |
getInputStream(String saveName, String syncId)下载网盘文件 |
Long |
getLength(String saveName, String syncId, Long length) |
protected String |
getServerUrl()网盘 API 接口地址 |
protected String |
getSsoUrl()单点登录的 API 路径 |
protected String |
getToken(Employee emp)获取 sso token 以便调用网盘 API |
Map |
getTree(Employee employee)获取个人网盘文件夹树列表 |
String |
getUrl(String saveName, String syncId, String fileName, Long length, String contentType, Date expiration) |
String |
save(String saveName, java.io.InputStream is, String fileName, Long length, String md5)上传文件到网盘 |
bropen.toolkit.api.Response |
saveAs(Employee employee, Attachment att, String folderId)文件另存到网盘 |
boolean |
shouldKeepLocalCopy(String fileName, Long length) |
| Methods inherited from class | Name |
|---|---|
class AbstractStorageService |
delete, deleteFailed, deleteRetry, exists, getEncodedInputStream, getInputStream, getLength, getUrl, isEnabled, save, setEnabled, shouldKeepLocalCopy, transfer |
class Object |
Object#wait(long, int), Object#wait(long), Object#wait(), Object#equals(Object), Object#toString(), Object#hashCode(), Object#getClass(), Object#notify(), Object#notifyAll() |
删除网盘文件
接口参数说明: token: 必填,令牌 fileIds: 必填,要删除的文件ID,多选则文件ID间用逗号分割;如果文件不存在,仍然返回删除成功 folderIds:选填,要删除的文件夹ID,多选则文件夹ID间用逗号分割
用户 account(bropen) 的附件同步文件夹的 ID
下载网盘文件
接口参数说明: token: 必填,令牌 fileId: 必填,文件ID pos: 必填,文件位置(字节位置)
网盘 API 接口地址
单点登录的 API 路径
获取 sso token 以便调用网盘 API
获取个人网盘文件夹树列表
接口参数说明: token 必填,令牌 pid: 选填,父文件夹ID,根文件夹的 pid 传参为 0 或 null
上传文件到网盘
接口参数说明: token: 必填,令牌 catalogId: 必填,所属文件夹 fileName: 必填,文件名字 fileHash: 必填,文件MD5 pos: 必填,文件位置(字节位置) fileSize: 必填,文件大小 file: 选填,文件流
文件另存到网盘
copyTo 接口参数说明: token: 必填,令牌 fileIds: 选填,文件ID,多选则文件ID间用逗号分割 folderIds: 选填,文件夹ID,多选则文件夹ID间用逗号分割 toFolderId: 必填,复制到的目标文件夹ID isCover: 必填,确认操作。参数说明 2:不覆盖, 1:覆盖, 0:第一次操作参数.