fix list and improve cloud functions
This commit is contained in:
@@ -35,7 +35,7 @@ exports.generateVideoThumbnail = onObjectFinalized(
|
||||
// Use unique folder under /tmp to avoid name collisions
|
||||
const tmpDir = path.join(
|
||||
os.tmpdir(),
|
||||
`thumb-${Date.now()}-${Math.round(Math.random() * 1000)}`
|
||||
`thumb-${Date.now()}-${Math.round(Math.random() * 1000)}`,
|
||||
);
|
||||
const baseName = path.basename(objectName);
|
||||
const dirName = path.posix.dirname(objectName);
|
||||
@@ -96,7 +96,7 @@ exports.generateVideoThumbnail = onObjectFinalized(
|
||||
thumbnailUrl,
|
||||
updatedAt: admin.firestore.FieldValue.serverTimestamp(),
|
||||
},
|
||||
{ merge: true }
|
||||
{ merge: true },
|
||||
);
|
||||
}
|
||||
|
||||
@@ -115,5 +115,5 @@ exports.generateVideoThumbnail = onObjectFinalized(
|
||||
} finally {
|
||||
await fs.rm(tmpDir, { recursive: true, force: true });
|
||||
}
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user