More work on export
This commit is contained in:
parent
94bf35875a
commit
2b2c736311
5 changed files with 327 additions and 299 deletions
|
|
@ -9,9 +9,7 @@ export type KeanuEventExtension = {
|
|||
}
|
||||
|
||||
export type EventAttachmentUrlType = "src" | "thumbnail";
|
||||
export type EventAttachmentLoadSrcOptions = {
|
||||
asBlob?: boolean;
|
||||
}
|
||||
export type EventAttachmentUrlData = {data: string, type: EventAttachmentUrlType};
|
||||
|
||||
export type EventAttachment = {
|
||||
event: MatrixEvent & KeanuEventExtension;
|
||||
|
|
@ -19,13 +17,14 @@ export type EventAttachment = {
|
|||
src?: string;
|
||||
srcSize: number;
|
||||
srcProgress: number;
|
||||
srcPromise?: Promise<{data: string | Blob, type: EventAttachmentUrlType}>;
|
||||
srcPromise?: Promise<EventAttachmentUrlData>;
|
||||
thumbnail?: string;
|
||||
thumbnailProgress: number;
|
||||
thumbnailPromise?: Promise<{data: string | Blob, type: EventAttachmentUrlType}>;
|
||||
thumbnailPromise?: Promise<EventAttachmentUrlData>;
|
||||
autoDownloadable: boolean;
|
||||
loadSrc: (options?: EventAttachmentLoadSrcOptions) => Promise<{data: string | Blob, type: EventAttachmentUrlType}>;
|
||||
loadThumbnail: () => Promise<{data: string | Blob, type: EventAttachmentUrlType}>;
|
||||
loadSrc: () => Promise<EventAttachmentUrlData>;
|
||||
loadThumbnail: () => Promise<EventAttachmentUrlData>;
|
||||
loadBlob: () => Promise<{data: Blob}>;
|
||||
release: (src: boolean, thumbnail: boolean) => void;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue