Merge branch 'v7/dev' into pr_5303

# Conflicts:
#	src/Umbraco.Web/Strategies/NotificationsHandler.cs
This commit is contained in:
Sebastiaan Janssen
2019-04-22 13:03:00 +02:00
2 changed files with 16 additions and 5 deletions

View File

@@ -377,21 +377,28 @@ namespace Umbraco.Core.IO
return new Size(width, height);
}
}
}
catch
{
//We will just swallow, just means we can't read exif data, we don't want to log an error either
}
//we have no choice but to try to read in via GDI
//we have no choice but to try to read in via GDI
try
{
using (var image = Image.FromStream(stream))
{
var fileWidth = image.Width;
var fileHeight = image.Height;
return new Size(fileWidth, fileHeight);
}
}
catch (Exception)
catch
{
//We will just swallow, just means we can't read exif data, we don't want to log an error either
return new Size(Constants.Conventions.Media.DefaultSize, Constants.Conventions.Media.DefaultSize);
//We will just swallow, just means we can't read via GDI, we don't want to log an error either
}
return new Size(Constants.Conventions.Media.DefaultSize, Constants.Conventions.Media.DefaultSize);
}
#endregion

View File

@@ -72,6 +72,10 @@ namespace Umbraco.Web.Strategies
content =>
applicationContext.Services.NotificationService.SendNotification(
content, ActionUnPublish.Instance, applicationContext));
//Send notifications for the rollback action
ContentService.RolledBack += (sender, args) => applicationContext.Services.NotificationService.SendNotification(
args.Entity, ActionRollback.Instance, applicationContext);
//Send notifications for the move and restore actions
ContentService.Moved += (sender, args) =>