Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
File size: 415 Bytes
e4e0e54 |
1 2 3 4 5 6 7 8 9 10 11 |
import { promises as fs } from "node:fs"
import path from "path"
import { Video } from "../types.mts"
import { pendingMetadataDirFilePath } from "../config.mts"
export const savePendingVideo = async (video: Video) => {
const fileName = `${video.ownerId}_${video.id}.json`
const filePath = path.join(pendingMetadataDirFilePath, fileName)
await fs.writeFile(filePath, JSON.stringify(video, null, 2), "utf8")
} |