π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Fix accidental aliasing
Manav Rathi06be08a3827c
diff --git a/web/apps/cast/src/services/detect-type.ts b/web/apps/cast/src/services/detect-type.tsindex 23469997fa..ca3b93ef2c 100644--- a/web/apps/cast/src/services/detect-type.ts+++ b/web/apps/cast/src/services/detect-type.ts@@ -1,6 +1,6 @@import { lowercaseExtension } from "@/base/file";import { KnownFileTypeInfos } from "@/media/file-type";-import FileType from "file-type";+import FileTypeDetect from "file-type";/*** Try to deduce the MIME type for the given {@link file}. Return the MIME type@@ -17,7 +17,7 @@ export const detectMediaMIMEType = async (file: File) => {const chunkSizeForTypeDetection = 4100;const fileChunk = file.slice(0, chunkSizeForTypeDetection);const chunk = new Uint8Array(await fileChunk.arrayBuffer());- const result = await FileType.fromBuffer(chunk);+ const result = await FileTypeDetect.fromBuffer(chunk);const mime = result?.mime;if (mime) {diff --git a/web/packages/new/photos/utils/detect-type.ts b/web/packages/new/photos/utils/detect-type.tsindex 24185e2ca9..05aff101b5 100644--- a/web/packages/new/photos/utils/detect-type.ts+++ b/web/packages/new/photos/utils/detect-type.ts@@ -6,6 +6,7 @@ import {type FileTypeInfo,} from "@/media/file-type";import { CustomError } from "@ente/shared/error";+import FileTypeDetect from "file-type";/*** Read the file's initial contents or use the file's name to detect its type.@@ -91,7 +92,7 @@ const readInitialChunkOfFile = async (file: File) => {};const detectFileTypeFromBuffer = async (buffer: Uint8Array) => {- const result = await FileType.fromBuffer(buffer);+ const result = await FileTypeDetect.fromBuffer(buffer);if (!result)throw Error("Could not deduce file type from the file's contents");return result;