mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-06 22:20:55 +03:00
hardcode prod to https urls
This commit is contained in:
@@ -115,7 +115,8 @@ app.post('/upload/:id', (req, res, next) => {
|
||||
req.pipe(req.busboy);
|
||||
req.busboy.on('file', (fieldname, file, filename) => {
|
||||
console.log('Uploading: ' + filename);
|
||||
let url = `${req.protocol}://${req.get('host')}/download/${req.params.id}/`;
|
||||
const protocol = conf.env === 'development' ? req.protocol : 'https';
|
||||
let url = `${protocol}://${req.get('host')}/download/${req.params.id}/`;
|
||||
|
||||
storage.set(req.params.id, file, filename, url).then(linkAndID => {
|
||||
res.json(linkAndID);
|
||||
|
||||
Reference in New Issue
Block a user