Initial commit - Media.RCL
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
@using Generic.Media.Components
|
||||
|
||||
<MediaUploadContainer @ref="_container" InitialUrls="@InitialUrls" OnChange="@OnChange" MaxItems="@MaxItems"
|
||||
AspectRatio="@AspectRatio" TargetWidth="@TargetWidth" TargetHeight="@TargetHeight"
|
||||
SingleUploadMode="@SingleUploadMode" AiModelApiKey="@AiModelApiKey" CdnBaseUrl="@CdnBaseUrl" />
|
||||
|
||||
@code {
|
||||
[Parameter] public List<string> InitialUrls { get; set; } = new();
|
||||
[Parameter] public EventCallback<List<string>> OnChange { get; set; }
|
||||
[Parameter] public int MaxItems { get; set; } = 10;
|
||||
[Parameter] public double? AspectRatio { get; set; }
|
||||
[Parameter] public int? TargetWidth { get; set; }
|
||||
[Parameter] public int? TargetHeight { get; set; }
|
||||
[Parameter] public bool SingleUploadMode { get; set; }
|
||||
[Parameter] public string? AiModelApiKey { get; set; }
|
||||
[Parameter] public string CdnBaseUrl { get; set; } = "http://localhost:2003/";
|
||||
|
||||
private MediaUploadContainer? _container;
|
||||
|
||||
public async Task<MediaUploadContainer.UploadResult> ProcessUploadsAsync()
|
||||
{
|
||||
if (_container == null) return new MediaUploadContainer.UploadResult();
|
||||
return await _container.ProcessUploadsAsync();
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
_container?.Clear();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user