Stop preemptively generating screenshots for video stories
This commit is contained in:
parent
f798bc999c
commit
54d4734f05
6 changed files with 57 additions and 19 deletions
|
@ -22,7 +22,8 @@ import { showToast } from './showToast';
|
|||
import { ToastFileSize } from '../components/ToastFileSize';
|
||||
|
||||
export async function processAttachment(
|
||||
file: File
|
||||
file: File,
|
||||
options?: { generateScreenshot: boolean }
|
||||
): Promise<InMemoryAttachmentDraftType | void> {
|
||||
const fileType = stringToMIMEType(file.type);
|
||||
|
||||
|
@ -31,7 +32,7 @@ export async function processAttachment(
|
|||
if (isImageTypeSupported(fileType) || isHeic(fileType, file.name)) {
|
||||
attachment = await handleImageAttachment(file);
|
||||
} else if (isVideoTypeSupported(fileType)) {
|
||||
attachment = await handleVideoAttachment(file);
|
||||
attachment = await handleVideoAttachment(file, options);
|
||||
} else {
|
||||
const data = await fileToBytes(file);
|
||||
attachment = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue