mirror of
https://github.com/QuotifyTeam/QuotifyBE.git
synced 2025-12-16 08:10:07 +01:00
fix: include .jpeg as an allowed file extension
This commit is contained in:
@@ -81,7 +81,7 @@ public class UserContentController : ControllerBase
|
|||||||
// A good idea would be to also check the Content-Type
|
// A good idea would be to also check the Content-Type
|
||||||
// of submitted files. ~eee4
|
// 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);
|
string fileExtension = Path.GetExtension(file.FileName);
|
||||||
if (!allowedExtensions.Contains(fileExtension.ToLower())) {
|
if (!allowedExtensions.Contains(fileExtension.ToLower())) {
|
||||||
|
|||||||
Reference in New Issue
Block a user