提问人:dancassin 提问时间:8/18/2023 更新时间:8/18/2023 访问量:29
使用 Pyscript 时,有没有办法更改 Panel 文件上传器的文件大小限制?
Is there a way to change file size limitations for Panel's file uploader when using Pyscript?
问:
目前在 Pyscript 程序中使用 Panel 的 FileInput 小部件,并且我遇到了文件大小限制的问题。根据此链接,似乎有绕过 Panel 默认文件大小的潜在方法,但不清楚如何在 .html Pyscript 文件中实现这一点。
他们可以通过 Jupyter Notebook(不适用)和“服务器上下文”获得方法:
# your_app.py
import panel as pn
app = ...
MAX_SIZE_MB = 150
pn.serve(
app,
# Increase the maximum websocket message size allowed by Bokeh
websocket_max_message_size=MAX_SIZE_MB*1024*1014,
# Increase the maximum buffer size allowed by Tornado
http_server_kwargs={'max_buffer_size': MAX_SIZE_MB*1024*1014}
)
...但是这段代码似乎在 .html 中不起作用
同样,这里的主要目标是增加 Panel 的 FileInput 小部件在 Pyscript .html 文件中的最大文件大小。
答: 暂无答案
上一个:面板弹出对话框
评论