π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Remove unused ElectronFile
Manav Rathi8327c2b8816f
diff --git a/web/apps/photos/src/components/Upload/Uploader.tsx b/web/apps/photos/src/components/Upload/Uploader.tsxindex 53ad1fb32f..7174306556 100644--- a/web/apps/photos/src/components/Upload/Uploader.tsx+++ b/web/apps/photos/src/components/Upload/Uploader.tsx@@ -1,6 +1,5 @@import { basename } from "@/next/file";import log from "@/next/log";-import { type FileAndPath } from "@/next/types/file";import type { CollectionMapping, Electron, ZipItem } from "@/next/types/ipc";import { CustomError } from "@ente/shared/error";import { isPromise } from "@ente/shared/utils";@@ -20,7 +19,7 @@ import {getPublicCollectionUploaderName,savePublicCollectionUploaderName,} from "services/publicCollectionService";-import type { UploadItem } from "services/upload/types";+import type { FileAndPath, UploadItem } from "services/upload/types";import type {InProgressUpload,SegregatedFinishedUploads,diff --git a/web/apps/photos/src/services/upload/types.ts b/web/apps/photos/src/services/upload/types.tsindex 05ad332d4a..25e2ab408a 100644--- a/web/apps/photos/src/services/upload/types.ts+++ b/web/apps/photos/src/services/upload/types.ts@@ -1,4 +1,3 @@-import type { FileAndPath } from "@/next/types/file";import type { ZipItem } from "@/next/types/ipc";/**@@ -30,6 +29,17 @@ import type { ZipItem } from "@/next/types/ipc";*/export type UploadItem = File | FileAndPath | string | ZipItem;+/**+ * When we are running in the context of our desktop app, we have access to the+ * absolute path of {@link File} objects. This convenience type clubs these two+ * bits of information, saving us the need to query the path again and again+ * using the {@link getPathForFile} method of {@link Electron}.+ */+export interface FileAndPath {+ file: File;+ path: string;+}+/*** The of cases of {@link UploadItem} that apply when we're running in the* context of our desktop app.diff --git a/web/packages/next/types/file.ts b/web/packages/next/types/file.tsdeleted file mode 100644index 6dd1032cdb..0000000000--- a/web/packages/next/types/file.ts+++ /dev/null@@ -1,36 +0,0 @@-/*- * ElectronFile is a custom interface that is used to represent- * any file on disk as a File-like object in the Electron desktop app.- *- * This was added to support the auto-resuming of failed uploads- * which needed absolute paths to the files which the- * normal File interface does not provide.- */-export interface ElectronFile {- name: string;- path: string;- size: number;- lastModified: number;- stream: () => Promise<ReadableStream<Uint8Array>>;- blob: () => Promise<Blob>;- arrayBuffer: () => Promise<Uint8Array>;-}--/**- * When we are running in the context of our desktop app, we have access to the- * absolute path of {@link File} objects. This convenience type clubs these two- * bits of information, saving us the need to query the path again and again- * using the {@link getPathForFile} method of {@link Electron}.- */-export interface FileAndPath {- file: File;- path: string;-}--export interface EventQueueItem {- type: "upload" | "trash";- folderPath: string;- collectionName?: string;- paths?: string[];- files?: ElectronFile[];-}