Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

put_file_upload 问题 1.8.2version #595

Open
fangweiwen opened this issue Aug 3, 2023 · 1 comment
Open

put_file_upload 问题 1.8.2version #595

fangweiwen opened this issue Aug 3, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@fangweiwen
Copy link

注: 对于PyWebIO使用咨询或对于其他人也可能有帮助的问题,请考虑移至 Discussions 进行发帖。

BUG描述
我这边是上传多个文件 每个文件有50M 选择了十几个文件然后上传 put_file_upload 报错 timeout waiting for response on 133,但是我配置都设置很大值了 还是报了 代码如下:
start_server(handle_upload, port=9099,debug=True, max_payload_size=3 * 1024 * 1024 * 1024,websocket_ping_timeout= 560,reconnect_timeout=560,
websocket_ping_interval=30,websocket_max_message_size=4 * 1024 * 1024 * 1024)
def handle_upload():
put_file_upload(label='选择apk文件上传:',name="upload_apk",multiple=True,
accept=['.apk'],
max_size=50 * 1024 * 1024)
put_buttons(['点击上传apk'], onclick=lambda _: start_upload_apk())
def start_upload_apk():
for i, file in enumerate(pin['upload_apk']):
put_text(f"#{i + 1}. 文件名:{file['filename']}")

环境信息

  • 操作系统及版本:
  • 浏览器及版本:
  • Python版本: 使用 python3 --version3.10.1 查看
  • PyWebIO版本: 使用 python3 -c "import pywebio;print(pywebio.__version__)" 查看
@fangweiwen fangweiwen added the bug Something isn't working label Aug 3, 2023
@wang0618
Copy link
Member

wang0618 commented Aug 3, 2023

可以尝试使用 aiohttp 或 fastapi 后端来启动pywebio app

文档: https://pywebio.readthedocs.io/zh_CN/latest/platform.html#aiohttp-support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants