Files
mattermost-mobile/types/api/files.d.ts
Daniel Espino García bebfccb964 [Gekidou] Add Draft Upload Manager (#5910)
* Add Draft Upload Manager

* Address feedback

* Use callbacks instead of events and add byteCount

* Address feedback
2022-02-01 17:26:26 +01:00

38 lines
814 B
TypeScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
type FileInfo = {
id?: string;
clientId?: string;
create_at: number;
delete_at: number;
extension: string;
failed?: boolean;
has_preview_image: boolean;
height: number;
loading?: boolean;
localPath?: string;
mime_type: string;
mini_preview?: string;
name: string;
post_id: string;
progress?: number;
bytesRead?: number;
size: number;
update_at: number;
uri?: string;
user_id: string;
width: number;
};
type FilesState = {
files: Dictionary<FileInfo>;
fileIdsByPostId: Dictionary<string[]>;
filePublicLink?: string;
};
type FileUploadResponse = {
file_infos: FileInfo[];
client_ids: string[];
};