设置nextcloud上传文件的大小

文档说明

根据nextcloud的官方文档,缺省可以上传的最大文件大小为 512M。以下是管理员官方文档的说明,摘自https://docs.nextcloud.com//server/14/admin_manual/configuration_files/big_file_upload_configuration.html

The default maximum file size for uploads is 512MB. You can increase this limit up to what your filesystem and operating system allows. There are certain hard limits that cannot be exceeded:

  • < 2GB on 32Bit OS-architecture
  • < 2GB with IE6 - IE8
  • < 4GB with IE9 - IE11

64-bit filesystems have much higher limits; consult the documentation for your filesystem.

我使用nginx + php7.2-fpm

下面也是官方文档,摘自https://docs.nextcloud.com//server/14/admin_manual/configuration_files/big_file_upload_configuration.html#nginx

nginx

Since nginx 1.7.11 a new config option fastcgi_request_buffering is availabe. Setting this option to fastcgi_request_buffering off; in your nginx config might help with timeouts during the upload. Furthermore it helps if you’re running out of disc space on the tmp partition of your system.

Note

Make sure that client_body_temp_path points to a partition with adequate space for your upload file size, and on the same partition as the upload_tmp_dir or tempdirectory (see below). For optimal performance, place these on a separate hard drive that is dedicated to swap and temp storage.

If your site is behind a nginx frontend (for example a loadbalancer):

By default, downloads will be limited to 1GB due to proxy_buffering and proxy_max_temp_file_size on the frontend.

修改nginx配置脚本

sudo vi /etc/nginx/sites-available/cloud

将配置文件中的

client_max_body_size 512M;

改为

client_max_body_size 2048M;

具体的cloud配置文件可以参见https://blog.csdn.net/justidle/article/details/102874134

重新启动服务

sudo systemctl restart php7.2-fpm
sudo systemctl restart nginx

 

P.S.

到底有没有起作用,没有测试过。

评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

努力的老周

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值