From a748c020ff593f3a7d1af38702dd1aa46bb4cdc1 Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Tue, 22 Jun 2021 08:29:15 -0500 Subject: [PATCH] Call out PS for dummy test files (#22591) --- aspnetcore/blazor/file-uploads.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/aspnetcore/blazor/file-uploads.md b/aspnetcore/blazor/file-uploads.md index a2ee586b71..60139300dd 100644 --- a/aspnetcore/blazor/file-uploads.md +++ b/aspnetcore/blazor/file-uploads.md @@ -90,6 +90,18 @@ The following example demonstrates multiple file upload in a component. > Namespaces in the `_Imports.razor` file aren't applied to C# files (`.cs`). C# files require an explicit [`using`](/dotnet/csharp/language-reference/language-specification/namespaces#using-directives) directive. +> [!NOTE] +> For testing file upload components, you can create test files of any size with [PowerShell](/powershell/): +> +> ```powershell +> $out = new-object byte[] {SIZE}; (new-object Random).NextBytes($out); [IO.File]::WriteAllBytes('{PATH}', $out) +> ``` +> +> In the preceding command: +> +> * The `{SIZE}` placeholder is the size of the file in bytes (for example, `2097152` for a 2 MB file). +> * The `{PATH}` placeholder is the path and file with file extension (for example, `D:/test_files/testfile2MB.txt`). + `Pages/FileUpload1.razor`: ::: zone pivot="webassembly"