save paste images locally WIP

This commit is contained in:
zadam
2020-03-25 11:28:44 +01:00
parent a856463173
commit 8a92786012
10 changed files with 196 additions and 40 deletions

View File

@@ -18,7 +18,7 @@ async function returnImage(req, res) {
res.set('Content-Type', 'image/png');
return res.send(fs.readFileSync(RESOURCE_DIR + '/db/image-deleted.png'));
}
image.mime = image.mime.replace("image/svg", "image/svg+xml");
res.set('Content-Type', image.mime);
res.send(await image.getContent());