Self-hosted personal gallery application with online photo management and albums, supporting Live/Motion Photos, EXIF parsing, geolocation recognition, and an explore map.
TypeScript albumsexif-extractiongeocodinglive-photomotion-photophoto-galleryphoto-sharingwebgl-viewer
fix(s3): thumbnail object key with no prefix
Timothy Yinf23d2e2305e7
diff --git a/server/services/photo/pipeline-async.ts b/server/services/photo/pipeline-async.tsindex 71622f37..99b5af66 100644--- a/server/services/photo/pipeline-async.ts+++ b/server/services/photo/pipeline-async.ts@@ -114,7 +114,7 @@ async function processPhotoInternal(setImmediate(async () => {try {const result = await storageProvider.create(- `thumbnails/${photoId}.webp`,+ `${(storageProvider.config?.prefix || '').replace(/\/+$/, '')}/thumbnails/${photoId}.webp`,thumbnailBuffer,'image/webp')diff --git a/server/services/storage/interfaces.ts b/server/services/storage/interfaces.tsindex de53a82d..2faa342d 100644--- a/server/services/storage/interfaces.ts+++ b/server/services/storage/interfaces.ts@@ -30,6 +30,7 @@ export type GitHubStorageConfig = {repository?: stringbranch?: stringpath?: string+ prefix?: stringtoken?: string}@@ -46,6 +47,7 @@ export interface UploadOptions {}export interface StorageProvider {+ config?: StorageConfigcreate(key: string,fileBuffer: Buffer,diff --git a/server/services/storage/providers/s3.ts b/server/services/storage/providers/s3.tsindex b3012044..31f24b5c 100644--- a/server/services/storage/providers/s3.ts+++ b/server/services/storage/providers/s3.ts@@ -49,7 +49,7 @@ const convertToStorageObject = (s3object: _Object): StorageObject => {}export class S3StorageProvider implements StorageProvider {- private config: S3StorageConfig+ config: S3StorageConfigprivate logger?: Logger['storage']private client: S3Client