blob: cbdb5ceadbe6eee85af31632c1e459fdaaf39d01 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
@page "/FileUploadTest"
<h3>FileUploadTest</h3>
<InputFile OnChange="FilePicked" multiple="false"></InputFile>
@code {
private async Task FilePicked(InputFileChangeEventArgs obj) {
Console.WriteLine("FilePicked");
Console.WriteLine(obj.File.Name);
Console.WriteLine(obj.File.Size);
Console.WriteLine(obj.File.ContentType);
var res = await RuntimeCache.CurrentHomeServer.UploadFile(obj.File.Name, obj.File.OpenReadStream(), obj.File.ContentType);
Console.WriteLine(res);
}
}
|