commit
53af3f2a14
|
@ -42,7 +42,7 @@
|
||||||
<td><a href="@(ContentUrl(context.FileId))" target="_new">@context.Name</a></td>
|
<td><a href="@(ContentUrl(context.FileId))" target="_new">@context.Name</a></td>
|
||||||
<td>@context.ModifiedOn</td>
|
<td>@context.ModifiedOn</td>
|
||||||
<td>@context.Extension.ToUpper() @Localizer["File"]</td>
|
<td>@context.Extension.ToUpper() @Localizer["File"]</td>
|
||||||
<td>@string.Format("{0:0.00}", ((decimal)context.Size / 1000)) KB</td>
|
<td>@(context.Size / 1000) KB</td>
|
||||||
</Row>
|
</Row>
|
||||||
</Pager>
|
</Pager>
|
||||||
@if (_files.Count == 0)
|
@if (_files.Count == 0)
|
||||||
|
|
|
@ -420,6 +420,13 @@
|
||||||
site.LogoFileId = logofileid;
|
site.LogoFileId = logofileid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var faviconFieldId = _faviconfilemanager.GetFileId();
|
||||||
|
if (faviconFieldId != -1)
|
||||||
|
{
|
||||||
|
site.FaviconFileId = faviconFieldId;
|
||||||
|
}
|
||||||
|
|
||||||
site.DefaultThemeType = _themetype;
|
site.DefaultThemeType = _themetype;
|
||||||
site.DefaultLayoutType = (_layouttype == "-" ? string.Empty : _layouttype);
|
site.DefaultLayoutType = (_layouttype == "-" ? string.Empty : _layouttype);
|
||||||
site.DefaultContainerType = _containertype;
|
site.DefaultContainerType = _containertype;
|
||||||
|
|
|
@ -535,19 +535,16 @@ namespace Oqtane.Controllers
|
||||||
file.ImageHeight = 0;
|
file.ImageHeight = 0;
|
||||||
file.ImageWidth = 0;
|
file.ImageWidth = 0;
|
||||||
|
|
||||||
//svg has no image and height, the attributes for svg are held in the XML viewport
|
if (Constants.ImageFiles.Split(',').Contains(file.Extension.ToLower()))
|
||||||
if(file.Extension != "svg")
|
{
|
||||||
{
|
FileStream stream = new FileStream(filepath, FileMode.Open, FileAccess.Read);
|
||||||
if (Constants.ImageFiles.Split(',').Contains(file.Extension.ToLower()))
|
using (var image = Image.FromStream(stream))
|
||||||
{
|
{
|
||||||
FileStream stream = new FileStream(filepath, FileMode.Open, FileAccess.Read);
|
file.ImageHeight = image.Height;
|
||||||
using (var image = Image.FromStream(stream))
|
file.ImageWidth = image.Width;
|
||||||
{
|
|
||||||
file.ImageHeight = image.Height;
|
|
||||||
file.ImageWidth = image.Width;
|
|
||||||
}
|
|
||||||
stream.Close();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stream.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
return file;
|
return file;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user