From 94d5e7292466e26159c1ec1c0fc740b39a7c593b Mon Sep 17 00:00:00 2001 From: Alexander Date: Tue, 16 Jul 2024 20:36:16 +0200 Subject: [PATCH] size limit --- OpenAIChatGPTBlazor/Pages/Index.razor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenAIChatGPTBlazor/Pages/Index.razor.cs b/OpenAIChatGPTBlazor/Pages/Index.razor.cs index 48ddc65..b0ddf49 100644 --- a/OpenAIChatGPTBlazor/Pages/Index.razor.cs +++ b/OpenAIChatGPTBlazor/Pages/Index.razor.cs @@ -73,7 +73,7 @@ private async Task LoadFiles(InputFileChangeEventArgs e) if (file != null) { var buffer = new byte[file.Size]; - await file.OpenReadStream().ReadAsync(buffer); + await file.OpenReadStream(10_000_000).ReadAsync(buffer); _file = (file.Name, new BinaryData(buffer), file.ContentType); } }