Skip to content

Commit

Permalink
nopSolutions#6572 SVG image decoding is not required and has been dis…
Browse files Browse the repository at this point in the history
…abled
  • Loading branch information
DmitriyKulagin committed Feb 8, 2023
1 parent d869c54 commit 6cf4136
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Libraries/Nop.Services/Media/PictureService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,10 @@ public virtual async Task<Picture> InsertPictureAsync(IFormFile formFile, string
if (contentType == MimeTypes.ImageSvg && !_mediaSettings.AllowSVGUploads)
return null;

var picture = await InsertPictureAsync(await _downloadService.GetDownloadBitsAsync(formFile), contentType, _fileProvider.GetFileNameWithoutExtension(fileName));
var picture = await InsertPictureAsync(await _downloadService.GetDownloadBitsAsync(formFile),
contentType,
_fileProvider.GetFileNameWithoutExtension(fileName),
validateBinary: contentType != MimeTypes.ImageSvg);

if (string.IsNullOrEmpty(virtualPath))
return picture;
Expand Down

0 comments on commit 6cf4136

Please sign in to comment.