diff --git a/web/apps/photos/src/services/download/index.ts b/web/apps/photos/src/services/download/index.ts index aaaf788f2..aa9ca68b8 100644 --- a/web/apps/photos/src/services/download/index.ts +++ b/web/apps/photos/src/services/download/index.ts @@ -172,9 +172,9 @@ class DownloadManagerImpl { if (!this.ready) { throw Error(CustomError.DOWNLOAD_MANAGER_NOT_READY); } - const cachedThumb = await this.getCachedThumbnail(file.id); + const cachedThumb = await this.thumbnailCache.get(`${file.id}`); if (cachedThumb) { - return cachedThumb; + return new Uint8Array(await cachedThumb.arrayBuffer()); } if (localOnly) { return null; diff --git a/web/packages/next/blob-cache.ts b/web/packages/next/blob-cache.ts index 64ab4a44f..25f1c76bf 100644 --- a/web/packages/next/blob-cache.ts +++ b/web/packages/next/blob-cache.ts @@ -110,6 +110,10 @@ export const openCache = async ( * * Also note that a File is a Blob! * + * To convert from a Blob to ArrayBuffer + * + * await blob.arrayBuffer() + * * Refs: * - https://github.com/yigitunallar/arraybuffer-vs-blob * - https://stackoverflow.com/questions/11821096/what-is-the-difference-between-an-arraybuffer-and-a-blob