π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
connect
Manav Rathi1f110929b2d7
diff --git a/web/apps/photos/src/components/PhotoViewer/ImageEditorOverlay/index.tsx b/web/apps/photos/src/components/PhotoViewer/ImageEditorOverlay/index.tsxindex 3c7b6a9cab..42edddbf11 100644--- a/web/apps/photos/src/components/PhotoViewer/ImageEditorOverlay/index.tsx+++ b/web/apps/photos/src/components/PhotoViewer/ImageEditorOverlay/index.tsx@@ -507,7 +507,7 @@ const ImageEditorOverlay = (props: IProps) => {const editedFile = await getEditedFile();const file = {- fileOrPath: editedFile,+ uploadItem: editedFile,localID: 1,collectionID: props.file.collectionID,};diff --git a/web/apps/photos/src/components/Upload/Uploader.tsx b/web/apps/photos/src/components/Upload/Uploader.tsxindex f5cb19e8c1..eb7595050b 100644--- a/web/apps/photos/src/components/Upload/Uploader.tsx+++ b/web/apps/photos/src/components/Upload/Uploader.tsx@@ -20,12 +20,12 @@ import {getPublicCollectionUploaderName,savePublicCollectionUploaderName,} from "services/publicCollectionService";+import type { UploadItem } from "services/upload/types";import type {InProgressUpload,SegregatedFinishedUploads,UploadCounter,UploadFileNames,- UploadItem,UploadItemWithCollection,} from "services/upload/uploadManager";import uploadManager from "services/upload/uploadManager";diff --git a/web/apps/photos/src/services/upload/uploadService.ts b/web/apps/photos/src/services/upload/uploadService.tsindex 6dc1bbd493..7d33038842 100644--- a/web/apps/photos/src/services/upload/uploadService.ts+++ b/web/apps/photos/src/services/upload/uploadService.ts@@ -57,8 +57,8 @@ import type { UploadableUploadItem } from "./uploadManager";/*** A readable stream for a file, and its associated size and last modified time.*- * This is the in-memory representation of the `fileOrPath` type that we usually- * pass around. See: [Note: Reading a UploadItem]+ * This is the in-memory representation of the {@link UploadItem} type that we+ * usually pass around. See: [Note: Reading a UploadItem]*/interface FileStream {/**@@ -602,11 +602,11 @@ interface ReadAssetDetailsResult {const readAssetDetails = async ({isLivePhoto,livePhotoAssets,- uploadItem: fileOrPath,+ uploadItem,}: UploadAsset): Promise<ReadAssetDetailsResult> =>isLivePhoto? readLivePhotoDetails(livePhotoAssets)- : readImageOrVideoDetails(fileOrPath);+ : readImageOrVideoDetails(uploadItem);const readLivePhotoDetails = async ({ image, video }: LivePhotoAssets) => {const img = await readImageOrVideoDetails(image);@@ -941,12 +941,12 @@ const readLivePhoto = async (// the entire stream into memory and pass the resultant data.//// This is a reasonable behaviour since the videos corresponding to live- // photos are only a couple of seconds long (we have already done a- // pre-flight check to ensure their size is small in `areLivePhotoAssets`).+ // photos are only a couple of seconds long (we've already done a pre-flight+ // check during areLivePhotoAssets to ensure their size is small).const fileOrData = async (sd: FileStream | Uint8Array) => {- const _fs = async ({ file, stream }: FileStream) =>+ const fos = async ({ file, stream }: FileStream) =>file ? file : await readEntireStream(stream);- return sd instanceof Uint8Array ? sd : _fs(sd);+ return sd instanceof Uint8Array ? sd : fos(sd);};return {