mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-15 06:27:34 -07:00
✌️
This commit is contained in:
parent
5696f19a60
commit
2446dbc333
2 changed files with 4 additions and 1 deletions
BIN
src/file/assets/not-an-image.png
(Stored with Git LFS)
Normal file
BIN
src/file/assets/not-an-image.png
(Stored with Git LFS)
Normal file
Binary file not shown.
|
@ -54,7 +54,7 @@ async function raw(data: Buffer, type: string, download: boolean, res: express.R
|
||||||
|
|
||||||
async function thumbnail(data: Buffer, type: string, resize: number, res: express.Response): Promise<any> {
|
async function thumbnail(data: Buffer, type: string, resize: number, res: express.Response): Promise<any> {
|
||||||
if (!/^image\/.*$/.test(type)) {
|
if (!/^image\/.*$/.test(type)) {
|
||||||
data = fs.readFileSync(`${__dirname}/assets/dummy.png`);
|
data = fs.readFileSync(`${__dirname}/assets/not-an-image.png`);
|
||||||
}
|
}
|
||||||
|
|
||||||
let g = gm(data);
|
let g = gm(data);
|
||||||
|
|
Loading…
Reference in a new issue