Remove support for non-gif images

This commit is contained in:
2023-10-19 16:50:56 -04:00
parent 44ee965c60
commit 9c35fa4a0a
2 changed files with 3 additions and 22 deletions

View File

@ -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`,