FilesApi class

Constructors

FilesApi(Dio _dio, Serializers _serializers)
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getFile({required String fileId, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<void>>
Get a file Gets a file that has been uploaded previously. ##### Permissions Must have `read_channel` permission or be uploader of the file.
getFileInfo({required String fileId, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<FileInfo>>
Get metadata for a file Gets a file's info. ##### Permissions Must have `read_channel` permission or be uploader of the file.
Get a public 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.
getFilePreview({required String fileId, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<void>>
Get a file's preview Gets a file's preview. ##### Permissions Must have `read_channel` permission or be uploader of the file.
getFilePublic({required String fileId, required String h, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<void>>
Get a public file
getFileThumbnail({required String fileId, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<void>>
Get a file's thumbnail Gets a file's thumbnail. ##### Permissions Must have `read_channel` permission or be uploader of the file.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
searchFiles({required String teamId, required String terms, required bool isOrSearch, int? timeZoneOffset, bool? includeDeletedChannels, int? page, int? perPage, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<FileInfoList>>
Search files in a team 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.
toString() String
A string representation of this object.
inherited
uploadFile({String? channelId, String? filename, MultipartFile? files, String? channelId2, String? clientIds, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<InlineResponse201>>
Upload a 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.

Operators

operator ==(Object other) bool
The equality operator.
inherited