public interface FilesApi
| Modifier and Type | Method and Description |
|---|---|
ApiResponse<Path> |
getFile(String fileId)
Get a file content.
|
ApiResponse<FileInfo> |
getFileMetadata(String fileId)
Get a file metadata.
|
ApiResponse<Path> |
getFilePreview(String fileId)
Get a file preview.
|
ApiResponse<Path> |
getFileThumbnail(String fileId)
Get a file thumbnail.
|
ApiResponse<String> |
getPublicFileLink(String fileId)
Get a public link can be access without logging in to Mattermost.
|
ApiResponse<FileUploadResult> |
uploadFile(String channelId,
Path... filePath)
Upload a file to specified channel.
|
ApiResponse<FileUploadResult> uploadFile(String channelId, Path... filePath) throws IOException
channelId - channel id will be upload file to.filePath - file path to upload.IOException - If an I/O error occursIllegalArgumentException - If no filePath specifiedApiResponse<Path> getFile(String fileId) throws IOException
fileId - the file id to getIOException - If an I/O error occursApiResponse<Path> getFileThumbnail(String fileId) throws IOException
fileId - the file id to get thumbnailIOException - If an I/O error occursApiResponse<Path> getFilePreview(String fileId) throws IOException
fileId - the file id to get previewIOException - If an I/O error occursApiResponse<String> getPublicFileLink(String fileId)
fileId - the file id to get public linkApiResponse<FileInfo> getFileMetadata(String fileId)
fileId - the file id to get metadataCopyright © 2019. All rights reserved.