Added Fetch Image from URL feature + Storm filelocks fixes + bulma inclusion into core

This commit is contained in:
NGPixel
2016-10-16 19:09:43 -04:00
parent 91d524eb06
commit 741a6674af
55 changed files with 3119 additions and 102 deletions

View File

@@ -44,7 +44,8 @@ router.post('/img', lcdata.uploadImgHandler, (req, res, next) => {
upl.validateUploadsFolder(destFolder).then((destFolderPath) => {
if(!destFolderPath) {
return res.json({ ok: false, msg: 'Invalid Folder' });
res.json({ ok: false, msg: 'Invalid Folder' });
return true;
}
Promise.map(req.files, (f) => {
@@ -95,8 +96,10 @@ router.post('/img', lcdata.uploadImgHandler, (req, res, next) => {
}
});
res.json({ ok: true, results: uplResults });
return true;
}).catch((err) => {
res.json({ ok: false, msg: err.message });
return true;
});
});