Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V14: MediaPicker/MNTP - Changed StartNodeId from a Udi to Guid #16042

Merged
merged 2 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class MultiNodePickerConfigurationTreeSource

[JsonPropertyName("id")]
[DataMember(Name = "id")]
public Udi? StartNodeId { get; set; }
public Guid? StartNodeId { get; set; }
}

[DataContract]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ private List<MediaWithCropsDto> HandleTemporaryMediaUploads(List<MediaWithCropsD
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();
Expand All @@ -225,7 +225,7 @@ private List<MediaWithCropsDto> HandleTemporaryMediaUploads(List<MediaWithCropsD
// 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();

Expand Down
Loading