diff --git a/packages/server-storage/src/http/controllers/bucket-file/handlers/stream.ts b/packages/server-storage/src/http/controllers/bucket-file/handlers/stream.ts index 61bd349c1..5c26ca697 100644 --- a/packages/server-storage/src/http/controllers/bucket-file/handlers/stream.ts +++ b/packages/server-storage/src/http/controllers/bucket-file/handlers/stream.ts @@ -41,6 +41,8 @@ export async function executeBucketFileRouteStreamHandler(req: Request, res: Res const minio = useMinio(); const stream = await minio.getObject(bucketName, entity.hash); - + stream.on('end', () => { + useLogger().debug(`Streamed file ${entity.hash} (${id}) of ${bucketName}`); + }); stream.pipe(res); } diff --git a/packages/server-storage/src/http/controllers/bucket/handlers/stream.ts b/packages/server-storage/src/http/controllers/bucket/handlers/stream.ts index 38a4c8022..aecf7c0b4 100644 --- a/packages/server-storage/src/http/controllers/bucket/handlers/stream.ts +++ b/packages/server-storage/src/http/controllers/bucket/handlers/stream.ts @@ -28,6 +28,8 @@ async function packFile( minio.getObject(name, file.hash) .then((stream) => streamToBuffer(stream)) .then((data) => { + useLogger().debug(`Packing file ${file.path} (${file.id})`); + pack.entry({ name: file.path, size: data.byteLength, @@ -102,4 +104,6 @@ export async function executeBucketRouteStreamHandler(req: Request, res: Respons useLogger().debug(`Streaming files of ${bucketName}`); await streamFiles(res, bucketName, files); + + useLogger().debug(`Streamed files of ${bucketName}`); }