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:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user