Update server/src/routes/assets.ts
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
parent
dec02225f1
commit
3ff07c23d2
1 changed files with 1 additions and 1 deletions
|
|
@ -50,7 +50,7 @@ export function assetRoutes(db: Db, storage: StorageService) {
|
||||||
|
|
||||||
const contentType = (file.mimetype || "").toLowerCase();
|
const contentType = (file.mimetype || "").toLowerCase();
|
||||||
if (!isAllowedContentType(contentType)) {
|
if (!isAllowedContentType(contentType)) {
|
||||||
res.status(422).json({ error: `Unsupported image type: ${contentType || "unknown"}` });
|
res.status(422).json({ error: `Unsupported file type: ${contentType || "unknown"}` });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (file.buffer.length <= 0) {
|
if (file.buffer.length <= 0) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue