NEW: Image Upload
This commit is contained in:
@@ -15,7 +15,13 @@
|
||||
<div class="row mb-1 align-items-center">
|
||||
<Label Class="col-sm-3" For="name" HelpText="Enter a name" ResourceKey="Name">Name: </Label>
|
||||
<div class="col-sm-9">
|
||||
<input id="name" class="form-control" @bind="@_name" required />
|
||||
<input id="name" class="form-control" @bind="@_blackBoard.Name" required/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-1 align-items-center">
|
||||
<Label Class="col-sm-3" For="description" HelpText="Enter a description" ResourceKey="Description">Beschreibung: </Label>
|
||||
<div class="col-sm-9">
|
||||
<FileManager AnonymizeUploadFilenames="true" UploadMultiple="false" ShowSuccess="true" FileId="@_blackBoard.ImageID" OnSelectFile="@OnFileSelected"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -30,7 +36,7 @@
|
||||
<br/><br/>
|
||||
@if (PageState.Action == "Edit")
|
||||
{
|
||||
<AuditInfo CreatedBy="@_createdby" CreatedOn="@_createdon" ModifiedBy="@_modifiedby" ModifiedOn="@_modifiedon"></AuditInfo>
|
||||
<AuditInfo CreatedBy="@_createdby" CreatedOn="@_createdon" ModifiedBy="@_modifiedby" ModifiedOn="@_modifiedon"></AuditInfo>
|
||||
}
|
||||
</form>
|
||||
|
||||
@@ -86,6 +92,13 @@
|
||||
}
|
||||
}
|
||||
|
||||
private Task OnFileSelected(int fileId)
|
||||
{
|
||||
Console.WriteLine("File Selected: " + fileId);
|
||||
_blackBoard.ImageID = fileId;
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
private async Task Save()
|
||||
{
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user