Files
Umbraco-CMS/src/Umbraco.Core/Notifications/ContentSavedBlueprintNotification.cs
Andy Butland b5195ed8eb Fixes issues with creation of documents from blueprints that have populated file upload properties (#19655)
* Fixes issue where content created from blueprint would not persist file upload property values.

* Ensure a copy of a file upload is created when scaffolding content from a blueprint, like we do when copying content.

* Clarified comment.

* Removed unneeded usings.

* Fixed spelling.

* Handle create of blueprint from content to create a new uploaded file.
Handle delete of blueprint to delete uploaded files.
2025-07-07 14:15:17 +02:00

36 lines
1.0 KiB
C#

// Copyright (c) Umbraco.
// See LICENSE for more details.
using Umbraco.Cms.Core.Events;
using Umbraco.Cms.Core.Models;
namespace Umbraco.Cms.Core.Notifications;
/// <summary>
/// A notification that is used to trigger the IContentService when the SavedBlueprint method is called in the API.
/// </summary>
public sealed class ContentSavedBlueprintNotification : ObjectNotification<IContent>
{
public ContentSavedBlueprintNotification(IContent target, EventMessages messages)
: base(target, messages)
{
}
public ContentSavedBlueprintNotification(IContent target, IContent? createdFromContent, EventMessages messages)
: base(target, messages)
{
CreatedFromContent = createdFromContent;
}
/// <summary>
/// Getting the saved blueprint <see cref="IContent"/> object.
/// </summary>
public IContent SavedBlueprint => Target;
/// <summary>
/// Getting the saved blueprint <see cref="IContent"/> object.
/// </summary>
public IContent? CreatedFromContent { get; }
}