From 2e53e7e17360d3f868fd26f9710e2f83e6bb626e Mon Sep 17 00:00:00 2001 From: Kibi Kelburton Date: Mon, 10 Aug 2026 17:42:48 +0200 Subject: [PATCH] stampy --- src/inc/routes/apiv2/upload.mjs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/inc/routes/apiv2/upload.mjs b/src/inc/routes/apiv2/upload.mjs index d6bedaa..6ea9d58 100644 --- a/src/inc/routes/apiv2/upload.mjs +++ b/src/inc/routes/apiv2/upload.mjs @@ -751,6 +751,7 @@ export default router => { await fs.unlink(source).catch(() => { }); const insertChecksum = getBypassDuplicateCheck() ? `${checksum}_bypass_${Date.now()}` : checksum; + const nowStamp = ~~(Date.now() / 1000); const targetExpiresAt = calculateExpiresAt(req.post?.expiry || req.headers['x-upload-expiry'] || req.post?.expires_at, nowStamp); const [{ id: itemid }] = await db`