mirror of
https://github.com/formbricks/formbricks.git
synced 2026-04-22 11:29:22 -05:00
fix: file size
This commit is contained in:
@@ -117,6 +117,11 @@ export const getAllowedFiles = async (
|
||||
try {
|
||||
const convertedFile = await convertHeicToJpeg(file);
|
||||
if (convertedFile) {
|
||||
const convertedFileSizeInMB = convertedFile.size / 1000000;
|
||||
if (maxSizeInMB && convertedFileSizeInMB > maxSizeInMB) {
|
||||
sizeExceedFiles.push(file.name);
|
||||
continue;
|
||||
}
|
||||
convertedFiles.push(
|
||||
new File([convertedFile], file.name.replace(/\.heic$/i, ".jpg"), {
|
||||
type: "image/jpeg",
|
||||
|
||||
Reference in New Issue
Block a user