diff --git a/client/web/src/utils/file-helper.ts b/client/web/src/utils/file-helper.ts index 54757bb6..3f0623bd 100644 --- a/client/web/src/utils/file-helper.ts +++ b/client/web/src/utils/file-helper.ts @@ -163,7 +163,11 @@ export async function compressImage( maxWidth: options?.maxWidth ?? 1920, maxHeight: options?.maxHeight ?? 1080, success(file) { - resolve(file as File); + if (file instanceof File) { + resolve(file); + } else { + resolve(new File([file], file.name)); + } }, error(err) { reject(err);