Remove support for non-gif images
This commit is contained in:
@ -138,21 +138,9 @@ export async function onRequestPost(context: RequestContext) {
|
||||
|
||||
if (
|
||||
fileParts.length < 2 ||
|
||||
![
|
||||
"mkv",
|
||||
"mp4",
|
||||
"wmv",
|
||||
"jpg",
|
||||
"png",
|
||||
"m4v",
|
||||
"jpeg",
|
||||
"jfif",
|
||||
"gif",
|
||||
"webm",
|
||||
"heif",
|
||||
"heic",
|
||||
"webp",
|
||||
].includes(fileExten.toLowerCase())
|
||||
!["mkv", "mp4", "wmv", "m4v", "gif", "webm"].includes(
|
||||
fileExten.toLowerCase(),
|
||||
)
|
||||
)
|
||||
return jsonError(
|
||||
`File ${file.name} cannot be uploaded as it is unsupported`,
|
||||
|
Reference in New Issue
Block a user