esxpfe
August 28, 2022, 11:26am
1
Hi there,
With a public File Drop page, a user cannot upload files larger than ~100MB. Logged in users are fine, large uploads working okay inside Nextcloud, the issue just seems to be on public File Drop pages only. Visitors say this is error message they get:
We have not had this issue with past Nextcloud versions until Nextcloud 24.
We have configured the settings for nginx and PHP and the Nextcloud config according to the documentation .
System
Nextcloud version: 24.0.4
Operating system and version: Ubuntu 20.04.5 LTS
Web server: nginx/1.18.0 (Ubuntu)
PHP version: PHP 8.0.14
Steps to replicate:
Share a folder and set to ‘File Drop’
Visit link and upload a file larger than 100MB.
esxpfe
September 13, 2022, 7:49pm
2
Hoping this will get a fix soon as it looks like an issue has been open for it since 2017: Allow chunked public upload · Issue #4109 · nextcloud/server · GitHub
opened 07:19PM - 30 Nov 21 UTC
closed 08:16AM - 01 Dec 21 UTC
bug
0. Needs triage
<!--
Thanks for reporting issues back to Nextcloud!
Note: This is the **issu… e tracker of Nextcloud**, please do NOT use this to get answers to your questions or get help for fixing your installation. This is a place to report bugs to developers, after your server has been debugged. You can find help debugging your system on our home user forums: https://help.nextcloud.com or, if you use Nextcloud in a large organization, ask our engineers on https://portal.nextcloud.com. See also https://nextcloud.com/support for support options.
Nextcloud is an open source project backed by Nextcloud GmbH. Most of our volunteers are home users and thus primarily care about issues that affect home users. Our paid engineers prioritize issues of our customers. If you are neither a home user nor a customer, consider paying somebody to fix your issue, do it yourself or become a customer.
Guidelines for submitting issues:
* Please search the existing issues first, it's likely that your issue was already reported or even fixed.
- Go to https://github.com/nextcloud and type any word in the top search/command bar. You probably see something like "We couldn’t find any repositories matching ..." then click "Issues" in the left navigation.
- You can also filter by appending e. g. "state:open" to the search string.
- More info on search syntax within github: https://help.github.com/articles/searching-issues
* This repository https://github.com/nextcloud/server/issues is *only* for issues within the Nextcloud Server code. This also includes the apps: files, encryption, external storage, sharing, deleted files, versions, LDAP, and WebDAV Auth
* SECURITY: Report any potential security bug to us via our HackerOne page (https://hackerone.com/nextcloud) following our security policy (https://nextcloud.com/security/) instead of filing an issue in our bug tracker.
* The issues in other components should be reported in their respective repositories: You will find them in our GitHub Organization (https://github.com/nextcloud/)
* You can also use the Issue Template app to prefill most of the required information: https://apps.nextcloud.com/apps/issuetemplate
-->
### How to use GitHub
* Please use the 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to show that you are affected by the same issue.
* Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
* Subscribe to receive notifications on status change and new comments.
### Summary
While researching this issue I came to understand that Nextcloud will chunk files to the correct size when needed. This is why you can use Nextcloud when logged in and the domain is behind a Cloudflare proxy.
However, it appears that this may not be happening on public shared links as any file larger than 100 MB ([the Cloudflare Free plan size limit for uploads](https://developers.cloudflare.com/cache/about/default-cache-behavior#customization-options-and-limitations)) will fail.
These same files will upload just find behind the same domain when logged in and uploading to the same shared folder.
### Steps to reproduce
1. Use domain behind Cloudflare proxy free plan (this enforces 100 MB upload limit)
2. Create shared folder to upload to (either File Drop or Allow Upload/Editing)
3. Attempt to upload a file 100 MB or smaller leads to success
4. Attempt to upload a file larger than 100 MB leads to 413 error
5. File larger than 100 MB can be successfully uploaded to Nextcloud folder when logged in (aka not using public link)
### Expected behaviour
Nextcloud to successfully upload files to public shared folders if it will let me upload them to that same folder when logged in
### Actual behaviour
A 413 error is thrown by Cloudflare when uploading files larger than 100 MB. Seemingly a result of the file not being chunked by Nextcloud.
### Server configuration
**Operating system:** Linux 5.10.28-Unraid x86_64
**Web server:**
**Database:** mysql
**PHP version:** 7.4.26
**Nextcloud version:** 23.0.0
**Updated from an older Nextcloud/ownCloud or fresh install:** Fresh install
**Where did you install Nextcloud from:** [LSIO Docker Container](https://hub.docker.com/r/linuxserver/nextcloud)
**Signing status:**
<details>
<summary>Signing status</summary>
```
No errors have been found.
```
</details>
**List of activated apps:**
<details>
<summary>App list</summary>
```
Enabled:
- accessibility: 1.9.0
- activity: 2.15.0
- calendar: 3.0.0
- circles: 23.0.0
- cloud_federation_api: 1.6.0
- comments: 1.13.0
- contacts: 4.0.6
- contactsinteraction: 1.4.0
- dashboard: 7.3.0
- dav: 1.21.0
- federatedfilesharing: 1.13.0
- federation: 1.13.0
- files: 1.18.0
- files_pdfviewer: 2.4.0
- files_rightclick: 1.2.0
- files_sharing: 1.15.0
- files_trashbin: 1.13.0
- files_versions: 1.16.0
- files_videoplayer: 1.12.0
- firstrunwizard: 2.12.0
- logreader: 2.8.0
- lookup_server_connector: 1.11.0
- mail: 1.11.0
- nextcloud_announcements: 1.12.0
- notifications: 2.11.1
- oauth2: 1.11.0
- password_policy: 1.13.0
- photos: 1.5.0
- privacy: 1.7.0
- provisioning_api: 1.13.0
- recommendations: 1.2.0
- richdocuments: 5.0.0
- serverinfo: 1.13.0
- settings: 1.5.0
- sharebymail: 1.13.0
- spreed: 13.0.0
- support: 1.6.0
- survey_client: 1.11.0
- systemtags: 1.13.0
- text: 3.4.0
- theming: 1.14.0
- twofactor_backupcodes: 1.12.0
- updatenotification: 1.13.0
- user_status: 1.3.1
- viewer: 1.7.0
- weather_status: 1.3.0
- workflowengine: 2.5.0
Disabled:
- admin_audit
- bruteforcesettings
- encryption
- files_external
- user_ldap
```
</details>
**Nextcloud configuration:**
<details>
<summary>Config report</summary>
```
Replaced domain name with '**DOMAIN**'
{
"system": {
"memcache.local": "\\OC\\Memcache\\APCu",
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"instanceid": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"192.168.0.10:446",
"data.**DOMAIN**.com"
],
"dbtype": "mysql",
"version": "23.0.0.10",
"overwrite.cli.url": "https:\/\/data.**DOMAIN**.com",
"overwritehost": "data.**DOMAIN**.com",
"overwriteprotocol": "https",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true
}
}
```
</details>
**Are you using external storage, if yes which one:** No
**Are you using encryption:** No
**Are you using an external user-backend, if yes which one:** No
### Client configuration
**Browser:** Chrome 96.0.4664.45
**Operating system:** Windows 10
solution
nginx
nexcloud.conf
change this line to
client_max_body_size 0;
nginx
nexcloud.conf
change this line to
client_max_body_size 0;
sudo service nginx restart
retry to upload big files
esxpfe
December 13, 2022, 1:47pm
5
Hi there, thanks for the suggestion.
I tried client_max_body_size 0;
as well as several very large values on nginx with Nextcloud 25.0.2 and unfortunately, I get the exact same behaviour.
I hope the addition of file chunking here fixes the problem?
did you restart nginx ?
did you use cloudflare ?
try client_max_body_size 0; and pass trough internal ip as public File Drop page. for me cloudflare block but not directly from ip
esxpfe
December 24, 2022, 1:40am
7
Hello,
Yes, I restarted nginx
service after any config file change like usual: sudo systemctl restart nginx
Yes, using Cloudflare, but I think the addition of file chunking for file drop pages would be great to fix the underlying problem, regardless of having Cloudflare (or any other provider) as a CDN.
Thanks,
E.
Aoude
December 26, 2022, 11:24am
8
I just wanted to chime in and say I’m experiencing the same issue. I’m running nextcloud via docker and using nginx reverse proxy. Large uploads work fine via my phone as I use photo/video backup all the time and also tested uploading a 4 GB file to the drop folder via the Android app. My max upload size is set to 40 GB and my nextcloud admin page confirms this. The only time I’ve experienced issues is with browser uploads via the drop folder, and doing so results in a 413 error once the file fully uploads (the upload is not rejected outright).
I’m happy to try out any potential solutions to this. Running the latest version of nextcloud.
i run lastest version of nexcloud … and no chunking for file drop.
only file chunk for loged user …
request the option to nextcloud directly …
but only cloudflare free package need it because of restrict to 100mb up.
vawaver
January 31, 2023, 8:47pm
10
Greetings,
I have the same situation as mentioned above.
Is there some news on how to fix it?
This doesn’t sound like the case for the OP, as he states it’s only an issue for guest users, but for some of the rest of you be aware the web interface is limited by the max size php allows. The relevant setting in the php.ini is:
upload_max_filesize
I have mine set to 1G
vawaver
February 5, 2023, 9:45pm
12
I can confirm when I disable Cloudflare for DNS, the upload issue disappears. Now everything is working fine, no crash during upload.