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:
parent
0b97d2ae94
commit
76e384b188
|
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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'
|
||||||
|
|
Loading…
Reference in New Issue