stream not needed

This commit is contained in:
Leigh Pointer 2021-02-18 08:52:57 +01:00
commit bd762cb5c9

View File

@ -537,11 +537,10 @@ namespace Oqtane.Controllers
//svg has no image and height, the attributes for svg are held in the XML viewport
if(file.Extension != "svg")
{
{
if (Constants.ImageFiles.Split(',').Contains(file.Extension.ToLower()))
{
FileStream stream = new FileStream(filepath, FileMode.Open, FileAccess.Read);
using (var image = Image.FromStream(stream))
{
file.ImageHeight = image.Height;