fix: include .jpeg as an allowed file extension

This commit is contained in:
2025-07-23 12:48:05 +02:00
parent f60f613969
commit df4cd1c8a7

View File

@@ -81,7 +81,7 @@ public class UserContentController : ControllerBase
// A good idea would be to also check the Content-Type
// of submitted files. ~eee4
List<string> allowedExtensions = new List<string>() { ".jpg", ".png", ".jfif", ".gif", ".avif", ".webp" };
List<string> allowedExtensions = new List<string>() { ".jpg", ".jpeg", ".jfif", ".png", ".gif", ".avif", ".webp" };
string fileExtension = Path.GetExtension(file.FileName);
if (!allowedExtensions.Contains(fileExtension.ToLower())) {