From c88afc5aaedef8043b8f1c24f0c44cd5ddb532dd Mon Sep 17 00:00:00 2001 From: Simone Cervino <6390896+Soxasora@users.noreply.github.com> Date: Wed, 20 Nov 2024 14:06:05 +0100 Subject: [PATCH] fix can't upload mp4 on safari (#1617) --- components/file-upload.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/file-upload.js b/components/file-upload.js index 8184d961..d674ba43 100644 --- a/components/file-upload.js +++ b/components/file-upload.js @@ -78,6 +78,11 @@ export const FileUpload = forwardRef(({ children, className, onSelect, onUpload, element.onerror = reject element.src = window.URL.createObjectURL(file) + + // iOS Force the video to load metadata + if (element.tagName === 'VIDEO') { + element.load() + } }) }, [toaster, getSignedPOST])