mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-06 14:10:53 +03:00
integrate with new ui
This commit is contained in:
@@ -24,7 +24,9 @@ module.exports = async function(req, res) {
|
||||
try {
|
||||
const limiter = new Limiter(config.max_file_size);
|
||||
const fileStream = req.pipe(limiter);
|
||||
await storage.set(newId, fileStream, meta);
|
||||
//this hasn't been updated to expiration time setting yet
|
||||
//if you want to fallback to this code add this
|
||||
await storage.set(newId, fileStream, meta, config.default_expire_seconds);
|
||||
const protocol = config.env === 'production' ? 'https' : req.protocol;
|
||||
const url = `${protocol}://${req.get('host')}/download/${newId}/`;
|
||||
res.set('WWW-Authenticate', `send-v1 ${meta.nonce}`);
|
||||
|
||||
Reference in New Issue
Block a user