diff --git a/database.sqlite3 b/database.sqlite3 index 23c1a34..9fadc38 100644 Binary files a/database.sqlite3 and b/database.sqlite3 differ diff --git a/index.js b/index.js index bf0a67b..23358c4 100644 --- a/index.js +++ b/index.js @@ -181,6 +181,9 @@ app.get("/api/logout", authorized(), (req, res) => { app.post("/api/upload-video", authorized(), fileUpload({ limits: { fileSize: 2 ** 26 }, useTempFiles: true }), async (req, res) => { const { title } = req.body; + if (!title) { + return res.status(400).json({ ok: false, error: "bad request" }); + } if (!req.files || !req.files.video) { return res.status(400).json({ ok: false, error: "bad request" }); @@ -206,6 +209,7 @@ app.post("/api/upload-video", authorized(), fileUpload({ limits: { fileSize: 2 * const queueItem = { videoId: id, userId, + title, errors: [], progress: 0, duration, diff --git a/public/queue/script.js b/public/queue/script.js index de0f090..7882a2e 100644 --- a/public/queue/script.js +++ b/public/queue/script.js @@ -36,11 +36,11 @@ async function main() {
Uploaded ${uploadedTime} of ${totalTime} (${percentage}%)
diff --git a/public/upload/index.html b/public/upload/index.html index 4f24573..9a264cb 100644 --- a/public/upload/index.html +++ b/public/upload/index.html @@ -4,19 +4,21 @@