diff --git a/pages/api/data/[upload].js b/pages/api/data/[upload].js index e0ce8419..e296545e 100644 --- a/pages/api/data/[upload].js +++ b/pages/api/data/[upload].js @@ -23,6 +23,9 @@ export default async (req, res) => { .send({ decorator: "UPLOAD_NOT_ALLOWED", error: true }); } + req.setTimeout(480000); + res.setTimeout(480000); + console.log(`[upload] upload for ${user.username} started`); const response = await Upload.formMultipart(req, res, { user, diff --git a/pages/api/v1/upload-data/[id].js b/pages/api/v1/upload-data/[id].js index eb84b5f0..6abcb220 100644 --- a/pages/api/v1/upload-data/[id].js +++ b/pages/api/v1/upload-data/[id].js @@ -83,6 +83,11 @@ export default async (req, res) => { id: key.owner_id, }); + console.log("[upload] establishing timeouts"); + req.setTimeout(480000); + res.setTimeout(480000); + console.log("[upload] timeouts set"); + const uploadResponse = await Upload.formMultipart(req, res, { user, });