fix can't upload from iOS camera/mov files (#1667)

* fix can't upload from iOS camera/mov files

* pivot: iOS automatically transcodes HEVC mov files to H264, custom error if codec not supported
This commit is contained in:
soxa 2024-12-01 02:12:13 +01:00 committed by GitHub
parent 0b97d2ae94
commit 76e384b188
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View File

@ -106,7 +106,11 @@ export const FileUpload = forwardRef(({ children, className, onSelect, onUpload,
if (onSelect) await onSelect?.(file, s3Upload) if (onSelect) await onSelect?.(file, s3Upload)
else await s3Upload(file) else await s3Upload(file)
} catch (e) { } catch (e) {
toaster.danger(`upload of '${file.name}' failed: ` + e.message || e.toString?.()) if (file.type === 'video/quicktime') {
toaster.danger(`upload of '${file.name}' failed: codec might not be supported, check video settings`)
} else {
toaster.danger(`upload of '${file.name}' failed: ` + e.message || e.toString?.())
}
continue continue
} }
} }

View File

@ -27,6 +27,7 @@ export const UPLOAD_TYPES_ALLOW = [
'image/png', 'image/png',
'image/jpeg', 'image/jpeg',
'image/webp', 'image/webp',
'video/quicktime',
'video/mp4', 'video/mp4',
'video/mpeg', 'video/mpeg',
'video/webm' 'video/webm'