Module files_api

Source

Enums§

GetFileError
struct for typed errors of method get_file
GetFileInfoError
struct for typed errors of method get_file_info
GetFileLinkError
struct for typed errors of method get_file_link
GetFilePreviewError
struct for typed errors of method get_file_preview
GetFilePublicError
struct for typed errors of method get_file_public
GetFileThumbnailError
struct for typed errors of method get_file_thumbnail
SearchFilesError
struct for typed errors of method search_files
UploadFileError
struct for typed errors of method upload_file

Functions§

get_file
Gets a file that has been uploaded previously. ##### Permissions Must have read_channel permission or be uploader of the file.
get_file_info
Gets a file’s info. ##### Permissions Must have read_channel permission or be uploader of the file.
get_file_link
Gets a public link for a file that can be accessed without logging into Mattermost. ##### Permissions Must have read_channel permission or be uploader of the file.
get_file_preview
Gets a file’s preview. ##### Permissions Must have read_channel permission or be uploader of the file.
get_file_public
Permissions No permissions required.
get_file_thumbnail
Gets a file’s thumbnail. ##### Permissions Must have read_channel permission or be uploader of the file.
search_files
Search for files in a team based on file name, extention and file content (if file content extraction is enabled and supported for the files). Minimum server version: 5.34 ##### Permissions Must be authenticated and have the view_team permission.
upload_file
Uploads a file that can later be attached to a post. This request can either be a multipart/form-data request with a channel_id, files and optional client_ids defined in the FormData, or it can be a request with the channel_id and filename defined as query parameters with the contents of a single file in the body of the request. Only multipart/form-data requests are supported by server versions up to and including 4.7. Server versions 4.8 and higher support both types of requests. ##### Permissions Must have upload_file permission.