integrate with new ui
This commit is contained in:
parent
13057804ab
commit
bf16e5c8a9
27 changed files with 250 additions and 315 deletions
|
@ -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}`);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue