52.5.4. 端点前缀 文件
有关 Box 文件的更多信息,请参阅 https://developer.box.com/reference#file-object。以下端点可以通过前缀 文件
调用,如下所示:
box:files/endpoint?[options]
端点 | 简写别名 | 选项 | 结果 Body 类型 |
---|---|---|---|
uploadFile | 上传 | parentFolderId, 内容, fileName, [created], [modified], [size], [listener] | com.box.sdk.BoxFile |
downloadFile | 下载 | fileId, output, [rangeStart], [rangeEnd], [listener] | java.io.OutputStream |
copyFile | 复制 | fileId, destinationFolderId, [newName] | com.box.sdk.BoxFile |
moveFile | Move | fileId, destinationFolderId, [newName] | com.box.sdk.BoxFile |
renameFile | 重命名 | fileId, newFileName | com.box.sdk.BoxFile |
createFileSharedLink | link | fileId, access, [unshareDate], [permissions] | com.box.sdk.BoxSharedLink |
deleteFile | delete | fileId | |
uploadNewFileVersion | uploadVersion | fileId, fileContent, [modified], [fileSize], [listener] | com.box.boxsdk.BoxFile |
promoteFileVersion | promoteVersion | fileId, version | com.box.sdk.BoxFileVersion |
getFileVersions | 版本 | fileId | java.util.Collection |
downloadPreviousFileVersions | downloadVersion | fileId、version、output、[listener] | java.io.OutputStream |
deleteFileVersion | deleteVersion | fileId, version | |
getFileInfo | info | fileId, 字段 | com.box.sdk.BoxFile.Info |
updateFileInfo | updateInfo | fileId, info | com.box.sdk.BoxFile |
createFileMetadata | createMetadata | fileId, metadata, [typeName] | com.box.sdk.Metadata |
getFileMetadata | metadata | fileId, [typeName] | com.box.sdk.Metadata |
updateFileMetadata | updateMetadata | fileId, metadata | com.box.sdk.Metadata |
deleteFileMetadata | deleteMetadata | fileId | |
getDownloadUrl | url | fileId | java.net.URL |
getPreviewLink | 预览 | fileId | java.net.URL |
getFileThumbnail | 缩略图 | fileId, fileType, minWidth, minHeight, maxWidth, maxHeight | byte[] |
文件的URI 选项
名称 | 类型 |
---|---|
parentFolderId | 字符串 |
content | java.io.InputStream |
fileName | 字符串 |
created | Date |
modified | Date |
size | Long |
listener | com.box.sdk.ProgressListener |
output | java.io.OutputStream |
rangeStart | Long |
rangeEnd | Long |
outputStreams | java.io.OutputStream[] |
destinationFolderId | 字符串 |
newName | 字符串 |
fields | String[] |
info | com.box.sdk.BoxFile.Info |
fileSize | Long |
version | 整数 |
access | com.box.sdk.BoxSharedLink.Access |
unshareDate | Date |
权限 | com.box.sdk.BoxSharedLink.Permissions |
fileType | com.box.sdk.BoxFile.ThumbnailFileType |
minWidth | 整数 |
minHeight | 整数 |
maxWidth | 整数 |
maxHeight | 整数 |
metadata | com.box.sdk.Metadata |
typeName | 字符串 |