-
- All Known Implementing Classes:
MattermostClient
public interface FilesApiFiles API.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method 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.
-
-
-
Method Detail
-
uploadFile
ApiResponse<FileUploadResult> uploadFile(String channelId, Path... filePath) throws IOException
Upload a file to specified channel.- Parameters:
channelId- channel id will be upload file to.filePath- file path to upload.- Throws:
IOException- If an I/O error occursIllegalArgumentException- If no filePath specified
-
getFile
ApiResponse<Path> getFile(String fileId) throws IOException
Get a file content.- Parameters:
fileId- the file id to get- Throws:
IOException- If an I/O error occurs
-
getFileThumbnail
ApiResponse<Path> getFileThumbnail(String fileId) throws IOException
Get a file thumbnail.- Parameters:
fileId- the file id to get thumbnail- Throws:
IOException- If an I/O error occurs
-
getFilePreview
ApiResponse<Path> getFilePreview(String fileId) throws IOException
Get a file preview.- Parameters:
fileId- the file id to get preview- Throws:
IOException- If an I/O error occurs
-
getPublicFileLink
ApiResponse<String> getPublicFileLink(String fileId)
Get a public link can be access without logging in to Mattermost.- Parameters:
fileId- the file id to get public link
-
getFileMetadata
ApiResponse<FileInfo> getFileMetadata(String fileId)
Get a file metadata.- Parameters:
fileId- the file id to get metadata
-
-