[Video] Allow drag-and-drop & pasting video (#5252)
* allow DnD/pasting video * rm await
This commit is contained in:
parent
6bc5a05f4b
commit
08f5f37b34
2 changed files with 23 additions and 9 deletions
|
@ -303,9 +303,13 @@ export const ComposePost = observer(function ComposePost({
|
|||
const onPhotoPasted = useCallback(
|
||||
async (uri: string) => {
|
||||
track('Composer:PastedPhotos')
|
||||
await gallery.paste(uri)
|
||||
if (uri.startsWith('data:video/')) {
|
||||
selectVideo({uri, type: 'video', height: 0, width: 0})
|
||||
} else {
|
||||
await gallery.paste(uri)
|
||||
}
|
||||
},
|
||||
[gallery, track],
|
||||
[gallery, track, selectVideo],
|
||||
)
|
||||
|
||||
const isAltTextRequiredAndMissing = useMemo(() => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue