Look signature for file type

This commit is contained in:
Dominic Villemure
2024-07-10 01:51:08 -04:00
parent d2c6209954
commit df55125c48
2 changed files with 24 additions and 3 deletions

View File

@@ -44,7 +44,7 @@ public class AzureBlobStorageService : IAzureBlobStorageService
}
// Validate content type
if (!ContentTypes.IsAllowed(contentType))
if (!ContentTypes.IsAllowed(contentType, memoryStream))
{
_logger.LogInformation($"Blob storage: Unsupported file type {contentType}. Only PNG and JPEG are allowed.");
throw new InvalidOperationException("Unsupported file type. Only PNG and JPEG are allowed.");