A little bit of cleanup
This commit is contained in:
parent
02bd4c6fd8
commit
6761e39d70
2 changed files with 2 additions and 5 deletions
|
@ -1,3 +0,0 @@
|
|||
[
|
||||
{ "id": "1", "host": "localhost", "port": 2333, "password": "youshallnotpass" }
|
||||
]
|
|
@ -65,11 +65,11 @@ exports.check = (cmd) => {
|
|||
|
||||
exports.getType = async (image) => {
|
||||
if (!image.startsWith("http")) {
|
||||
imageType = await fileType.fromFile(image)
|
||||
const imageType = await fileType.fromFile(image);
|
||||
if (imageType && formats.includes(imageType.mime)) {
|
||||
return imageType.mime;
|
||||
}
|
||||
return undefined
|
||||
return undefined;
|
||||
}
|
||||
let type;
|
||||
const controller = new AbortController();
|
||||
|
|
Loading…
Reference in a new issue