fix prompt and thumbnail path

This commit is contained in:
Thomas Demirdjian
2025-10-01 15:48:23 +02:00
parent 0bc186413b
commit 66b41e8b73
3 changed files with 109 additions and 83 deletions
+3 -1
View File
@@ -29,7 +29,9 @@ exports.generateVideoThumbnail = onObjectFinalized(
if (/_thumb9x16\.jpg$/i.test(objectName)) return;
const bucket = admin.storage().bucket(bucketName);
const playbackMatch = objectName.match(/^musics\/([^/]+)\/playback\.mp4$/i);
const playbackMatch = objectName.match(
/^users\/[^/]+\/projects\/([^/]+)\/playback\.mp4$/i,
);
const projectId = playbackMatch ? playbackMatch[1] : null;
// Use unique folder under /tmp to avoid name collisions