mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
feat(media): support arbitrary file types with download cards (#810)
Signed-off-by: Wes <wesbillman@users.noreply.github.com> Co-authored-by: Brain <21994759fc7a6fa6b965551d35cfd7897d262f2495467f2d78694ddcfa6a5c7e@sprout-oss.stage.blox.sqprod.co>
This commit is contained in:
@@ -759,6 +759,8 @@ export type BlobDescriptor = {
|
||||
thumb?: string;
|
||||
duration?: number;
|
||||
image?: string;
|
||||
/** Original filename for generic (non-media) file attachments. */
|
||||
filename?: string;
|
||||
};
|
||||
|
||||
export async function uploadMedia(
|
||||
@@ -777,8 +779,9 @@ export async function pickAndUploadMedia(): Promise<BlobDescriptor[]> {
|
||||
|
||||
export async function uploadMediaBytes(
|
||||
data: number[],
|
||||
filename?: string,
|
||||
): Promise<BlobDescriptor> {
|
||||
return invokeTauri<BlobDescriptor>("upload_media_bytes", { data });
|
||||
return invokeTauri<BlobDescriptor>("upload_media_bytes", { data, filename });
|
||||
}
|
||||
|
||||
export async function editMessage(
|
||||
|
||||
Reference in New Issue
Block a user