diff --git a/apps/api/src/video/video.service.ts b/apps/api/src/video/video.service.ts index 688a1b3..30d37e9 100644 --- a/apps/api/src/video/video.service.ts +++ b/apps/api/src/video/video.service.ts @@ -240,8 +240,9 @@ export class VideoService { if ((await this.requireStorage().directPublicJwk()) === null) { throw new ServiceUnavailableException("DIRECT_EC_PRIVATE_KEY is not configured"); } + // ONE uuid: the object key binds to the upload id so /complete can pin it. const uploadId = randomUUID(); - const objectKey = directObjectKey(); + const objectKey = `direct/${uploadId}.enc`; const putUrl = await this.requireStorage() .presignPut(objectKey, input.mimeType, DIRECT_PUT_TTL_SECONDS) .catch(() => { throw new ServiceUnavailableException("Video storage is unavailable: could not presign the direct PUT"); });