Skip to content

Commit 1c39933

Browse files
committed
refactor: 精简代码
1 parent 5779d48 commit 1c39933

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/BootstrapBlazor/Extensions/UploadFileExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public static async Task<bool> SaveToFileAsync(this UploadFile upload, string fi
100100
while ((bytesRead = await stream.ReadAsync(buffer, token)) > 0)
101101
{
102102
totalRead += bytesRead;
103-
await uploadFile.WriteAsync(buffer.AsMemory(0, bytesRead), token);
103+
await uploadFile.WriteAsync(buffer, 0, bytesRead, token);
104104

105105
if (upload.UpdateCallback != null)
106106
{

0 commit comments

Comments
 (0)