From 68a1edbbfe56cb8cd5f36958fdf48d9773a1e8a3 Mon Sep 17 00:00:00 2001 From: tycrek Date: Fri, 2 Jul 2021 23:54:18 -0600 Subject: [PATCH] save domain along with file --- routers/upload.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/routers/upload.js b/routers/upload.js index 48f6d36..44b1c8c 100644 --- a/routers/upload.js +++ b/routers/upload.js @@ -38,6 +38,9 @@ router.post('/', (req, res) => { const trueDomain = getTrueDomain(req.headers['x-ass-domain']); const generator = req.headers['x-ass-access'] || resourceIdType; + // Save domain with file + req.file.domain = `${getTrueHttp()}${trueDomain}`; + // Get the uploaded time in milliseconds req.file.timestamp = DateTime.now().toMillis();