Skip to content

Commit 68f623e

Browse files
authored
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`
1 parent 2d850bf commit 68f623e

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/Umbraco.Core/PropertyEditors/MediaPicker3Configuration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public class MediaPicker3Configuration : IIgnoreUserStartNodesConfig
1515
public NumberRange ValidationLimit { get; set; } = new();
1616

1717
[ConfigurationField("startNodeId")]
18-
public Udi? StartNodeId { get; set; }
18+
public Guid? StartNodeId { get; set; }
1919

2020
[ConfigurationField("enableLocalFocalPoint")]
2121
public bool EnableLocalFocalPoint { get; set; }

src/Umbraco.Core/PropertyEditors/MultiNodePickerConfigurationTreeSource.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public class MultiNodePickerConfigurationTreeSource
2222

2323
[JsonPropertyName("id")]
2424
[DataMember(Name = "id")]
25-
public Udi? StartNodeId { get; set; }
25+
public Guid? StartNodeId { get; set; }
2626
}
2727

2828
[DataContract]

src/Umbraco.Infrastructure/PropertyEditors/MediaPicker3PropertyEditor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ private List<MediaWithCropsDto> HandleTemporaryMediaUploads(List<MediaWithCropsD
208208
continue;
209209
}
210210

211-
GuidUdi? startNodeGuid = configuration.StartNodeId as GuidUdi ?? null;
211+
Guid? startNodeGuid = configuration.StartNodeId;
212212

213213
// make sure we'll clean up the temporary file if the scope completes
214214
using IScope scope = _scopeProvider.CreateScope();
@@ -218,7 +218,7 @@ private List<MediaWithCropsDto> HandleTemporaryMediaUploads(List<MediaWithCropsD
218218
// there are multiple allowed media types matching the file extension
219219
using Stream fileStream = temporaryFile.OpenReadStream();
220220
IMedia mediaFile = _mediaImportService
221-
.ImportAsync(temporaryFile.FileName, fileStream, startNodeGuid?.Guid, mediaWithCropsDto.MediaTypeAlias, userKey)
221+
.ImportAsync(temporaryFile.FileName, fileStream, startNodeGuid, mediaWithCropsDto.MediaTypeAlias, userKey)
222222
.GetAwaiter()
223223
.GetResult();
224224

0 commit comments

Comments
 (0)