V14: MediaPicker/MNTP - Changed StartNodeId from a Udi to Guid (#16042)
* MediaPicker3: Changed `StartNodeId` from a `Udi` to `Guid` * MNTP: Changed `StartNodeId` from a `Udi` to `Guid`
This commit is contained in:
@@ -15,7 +15,7 @@ public class MediaPicker3Configuration : IIgnoreUserStartNodesConfig
|
||||
public NumberRange ValidationLimit { get; set; } = new();
|
||||
|
||||
[ConfigurationField("startNodeId")]
|
||||
public Udi? StartNodeId { get; set; }
|
||||
public Guid? StartNodeId { get; set; }
|
||||
|
||||
[ConfigurationField("enableLocalFocalPoint")]
|
||||
public bool EnableLocalFocalPoint { get; set; }
|
||||
|
||||
@@ -22,7 +22,7 @@ public class MultiNodePickerConfigurationTreeSource
|
||||
|
||||
[JsonPropertyName("id")]
|
||||
[DataMember(Name = "id")]
|
||||
public Udi? StartNodeId { get; set; }
|
||||
public Guid? StartNodeId { get; set; }
|
||||
}
|
||||
|
||||
[DataContract]
|
||||
|
||||
@@ -208,7 +208,7 @@ public class MediaPicker3PropertyEditor : DataEditor
|
||||
continue;
|
||||
}
|
||||
|
||||
GuidUdi? startNodeGuid = configuration.StartNodeId as GuidUdi ?? null;
|
||||
Guid? startNodeGuid = configuration.StartNodeId;
|
||||
|
||||
// make sure we'll clean up the temporary file if the scope completes
|
||||
using IScope scope = _scopeProvider.CreateScope();
|
||||
@@ -218,7 +218,7 @@ public class MediaPicker3PropertyEditor : DataEditor
|
||||
// there are multiple allowed media types matching the file extension
|
||||
using Stream fileStream = temporaryFile.OpenReadStream();
|
||||
IMedia mediaFile = _mediaImportService
|
||||
.ImportAsync(temporaryFile.FileName, fileStream, startNodeGuid?.Guid, mediaWithCropsDto.MediaTypeAlias, userKey)
|
||||
.ImportAsync(temporaryFile.FileName, fileStream, startNodeGuid, mediaWithCropsDto.MediaTypeAlias, userKey)
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user