diff options
Diffstat (limited to 'MatrixRoomUtils.Web/FileUploadTest.razor')
-rw-r--r-- | MatrixRoomUtils.Web/FileUploadTest.razor | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/MatrixRoomUtils.Web/FileUploadTest.razor b/MatrixRoomUtils.Web/FileUploadTest.razor new file mode 100644 index 0000000..2e25b54 --- /dev/null +++ b/MatrixRoomUtils.Web/FileUploadTest.razor @@ -0,0 +1,19 @@ +@page "/FileUploadTest" +<h3>FileUploadTest</h3> + +<InputFile OnChange="FilePicked" multiple="false"></InputFile> + + +@code { + + private async void 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); + } + +} \ No newline at end of file |