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.
This commit is contained in:
@@ -3611,6 +3611,9 @@ public class ContentService : RepositoryService, IContentService
|
||||
}
|
||||
|
||||
public void SaveBlueprint(IContent content, int userId = Constants.Security.SuperUserId)
|
||||
=> SaveBlueprint(content, null, userId);
|
||||
|
||||
public void SaveBlueprint(IContent content, IContent? createdFromContent, int userId = Constants.Security.SuperUserId)
|
||||
{
|
||||
EventMessages evtMsgs = EventMessagesFactory.Get();
|
||||
|
||||
@@ -3631,7 +3634,7 @@ public class ContentService : RepositoryService, IContentService
|
||||
|
||||
Audit(AuditType.Save, userId, content.Id, $"Saved content template: {content.Name}");
|
||||
|
||||
scope.Notifications.Publish(new ContentSavedBlueprintNotification(content, evtMsgs));
|
||||
scope.Notifications.Publish(new ContentSavedBlueprintNotification(content, createdFromContent, evtMsgs));
|
||||
scope.Notifications.Publish(new ContentTreeChangeNotification(content, TreeChangeTypes.RefreshNode, evtMsgs));
|
||||
|
||||
scope.Complete();
|
||||
|
||||
Reference in New Issue
Block a user