π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Use in cast
Manav Rathi08f23efecac2
diff --git a/web/apps/cast/src/constants/upload.ts b/web/apps/cast/src/constants/upload.tsdeleted file mode 100644index 2ae1c43833..0000000000--- a/web/apps/cast/src/constants/upload.ts+++ /dev/null@@ -1,13 +0,0 @@-export const RAW_FORMATS = [- "heic",- "rw2",- "tiff",- "arw",- "cr3",- "cr2",- "raf",- "nef",- "psd",- "dng",- "tif",-];diff --git a/web/apps/cast/src/pages/slideshow.tsx b/web/apps/cast/src/pages/slideshow.tsxindex 8554524b2c..4ffc4d3350 100644--- a/web/apps/cast/src/pages/slideshow.tsx+++ b/web/apps/cast/src/pages/slideshow.tsx@@ -1,4 +1,6 @@import { FILE_TYPE } from "@/media/file-type";+import { isNonWebImageFileExtension } from "@/media/formats";+import { nameAndExtension } from "@/next/file";import log from "@/next/log";import PairedSuccessfullyOverlay from "components/PairedSuccessfullyOverlay";import { PhotoAuditorium } from "components/PhotoAuditorium";@@ -11,7 +13,7 @@ import {} from "services/cast/castService";import { Collection } from "types/collection";import { EnteFile } from "types/file";-import { getPreviewableImage, isRawFileFromFileName } from "utils/file";+import { getPreviewableImage } from "utils/file";const renderableFileURLCache = new Map<number, string>();@@ -74,7 +76,9 @@ export default function Slideshow() {if (file.info.fileSize > 100 * 1024 * 1024) return false;- if (isRawFileFromFileName(file.metadata.title)) return false;+ const [, extension] = nameAndExtension(file.metadata.title);++ if (isNonWebImageFileExtension(extension)) return false;return true;};diff --git a/web/apps/cast/src/utils/file.ts b/web/apps/cast/src/utils/file.tsindex 91961b7bec..02c6b8134a 100644--- a/web/apps/cast/src/utils/file.ts+++ b/web/apps/cast/src/utils/file.ts@@ -2,7 +2,6 @@ import { FILE_TYPE } from "@/media/file-type";import { decodeLivePhoto } from "@/media/live-photo";import log from "@/next/log";import ComlinkCryptoWorker from "@ente/shared/crypto";-import { RAW_FORMATS } from "constants/upload";import CastDownloadManager from "services/castDownloadManager";import { detectMediaMIMEType } from "services/detect-type";import {@@ -95,15 +94,6 @@ export function generateStreamFromArrayBuffer(data: Uint8Array) {});}-export function isRawFileFromFileName(fileName: string) {- for (const rawFormat of RAW_FORMATS) {- if (fileName.toLowerCase().endsWith(rawFormat)) {- return true;- }- }- return false;-}-export function mergeMetadata(files: EnteFile[]): EnteFile[] {return files.map((file) => {if (file.pubMagicMetadata?.data.editedTime) {