Skip to content

chore(): SaveToFileAsync保存图片超时 #8242

Closed

Description

@TanShuJun1985

Which class is this unit test associated with?

UploadFileExtensions.cs 文件中 while ((bytesRead = await stream.ReadAsync(buffer, token)) > 0) 这行无法执行

异常信息:
Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
Unhandled exception in circuit '_wwVM43pA8AC484YCOb2OGJMF4YUiKXAdh1I9kBEWZ0'.
System.TimeoutException: Did not receive any data in the allotted time.
at System.IO.Pipelines.Pipe.GetReadResult(ReadResult& result)
at System.IO.Pipelines.Pipe.GetReadAsyncResult()
at System.IO.Pipelines.PipeReaderStream.ReadAsyncInternal(Memory`1 buffer, CancellationToken cancellationToken)

Activity

  1. Tony-ST0754 commented on Jul 20, 2026

    @Tony-ST0754
    Collaborator
  2. TanShuJun1985 commented on Jul 21, 2026

    @TanShuJun1985
    Author
    参考官网文档
    

    https://www.blazor.zone/upload-input

    我是和文档一样弄的,我测试过了用官网项目可以正常上传,但是移到我自己的项目就不行了,我不知道为什么

  3. Tony-ST0754 commented on Jul 21, 2026

    @Tony-ST0754
    Collaborator
    如果上传文件过大,可能会触发 signalR 通讯中断问题,请自行调整 HubOptions 配置即可。
    *** 仔细阅读文档 ***
    
    builder.Services.Configure<HubOptions>(option => option.MaximumReceiveMessageSize = null);
  4. TanShuJun1985 commented on Jul 21, 2026

    @TanShuJun1985
    Author
    如果上传文件过大,可能会触发 signalR 通讯中断问题,请自行调整 HubOptions 配置即可。
    *** 仔细阅读文档 ***
    

    builder.Services.Configure(option => option.MaximumReceiveMessageSize = null);

    MaximumReceiveMessageSize 我配置过

  5. Tony-ST0754 commented on Jul 21, 2026

    @Tony-ST0754
    Collaborator
    如果上传文件过大,可能会触发 signalR 通讯中断问题,请自行调整 HubOptions 配置即可。
    *** 仔细阅读文档 ***
    

    builder.Services.Configure(option => option.MaximumReceiveMessageSize = null);

    MaximumReceiveMessageSize 我配置过

    上传demo

  6. TanShuJun1985 commented on Jul 21, 2026

    @TanShuJun1985
    Author
    如果上传文件过大,可能会触发 signalR 通讯中断问题,请自行调整 HubOptions 配置即可。
    *** 仔细阅读文档 ***
    

    builder.Services.Configure(option => option.MaximumReceiveMessageSize = null);

    MaximumReceiveMessageSize 我配置过

    上传demo

    我找到原因了,是因为使用了Lamar导致的

  7. locked and limited conversation to collaborators on Jul 21, 2026
  8. converted this issue into a discussion #8246 on Jul 21, 2026
  9. added this to the v10.8.0 milestone on Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

choreThis are tasks or bot action

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions