From 50cbc0f85794201bec1222f3298d073255806d02 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 5 Mar 2024 20:57:13 +0200 Subject: [PATCH] docs(fileselect): Add note to FileSelect OnSelect example (#1959) Co-authored-by: Dimo Dimov <961014+dimodi@users.noreply.github.com> --- components/fileselect/events.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/fileselect/events.md b/components/fileselect/events.md index 0075b0527..6d826c86d 100644 --- a/components/fileselect/events.md +++ b/components/fileselect/events.md @@ -84,6 +84,8 @@ The event handler receives a [`FileSelectEventArgs` object](#fileselectfileinfo) private async Task UploadFile(FileSelectFileInfo file) { + // This code will work in Blazor Server apps. + // Saving files on the user device is not allowed in WebAssembly apps. Tokens.Add(file.Id, new CancellationTokenSource()); var path = Path.Combine(HostingEnvironment?.WebRootPath, file.Name); await using FileStream fs = new FileStream(path, FileMode.Create);