Large file streaming uploads

This commit is contained in:
Shaun Walker
2019-09-06 13:15:18 -04:00
parent 22420f2b43
commit a84eee8782
17 changed files with 305 additions and 13 deletions

View File

@ -0,0 +1,30 @@
@using Microsoft.AspNetCore.Components.Routing
@using Oqtane.Client.Modules.Controls
@using Oqtane.Modules
@using Oqtane.Services
@inherits ModuleBase
@inject IUriHelper UriHelper
@inject IFileService FileService
<table class="table table-borderless">
<tr>
<td>
<label for="Name" class="control-label">Module: </label>
</td>
<td>
<FileUpload Filter=".nupkg"></FileUpload>
</td>
</tr>
</table>
<button type="button" class="btn btn-success" @onclick="UploadFile">Upload</button>
<NavLink class="btn btn-secondary" href="@NavigateUrl()">Cancel</NavLink>
@code {
public override SecurityAccessLevel SecurityAccessLevel { get { return SecurityAccessLevel.Host; } }
private async Task UploadFile()
{
await FileService.UploadFilesAsync("/Sites/Modules");
}
}

View File

@ -12,6 +12,7 @@
}
else
{
<ActionLink Action="Add" Text="Upload Module" />
<table class="table table-borderless">
<thead>
<tr>