其他分享
首页 > 其他分享> > 解决 R Shiny 报错 “Maximum upload size exceeded“ ;更改 Shiny 上传文件大小限制

解决 R Shiny 报错 “Maximum upload size exceeded“ ;更改 Shiny 上传文件大小限制

作者:互联网

遇到的问题

在shiny中上传文件时出现了报错,如下图:
在这里插入图片描述
看了一下文件大小有53M,之前传5M的文件时没有出现过报错,在参考中找到了解决方案。



解决方案

在 server.R 的开头增加了一句options(shiny.maxRequestSize=60*1024^2) ,如图所示。
在这里插入图片描述
再次上传文件后成功运行。
在这里插入图片描述



参考

“Maximum upload size exceeded” when upload csv data 中的 By default, Shiny limits file uploads to 5MB per file. You can modify this limit by using the shiny.maxRequestSize option. For example, adding options(shiny.maxRequestSize=30*1024^2) to the top of server.R would increase the limit to 30MB.

标签:文件大小,上传,maxRequestSize,shiny,upload,报错,Shiny
来源: https://blog.csdn.net/douerw/article/details/115614164