hardcode prod to https urls
This commit is contained in:
parent
1c67eea2f0
commit
82b71b2af7
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user