[GH-ISSUE #340] 413 (Payload Too Large) #181

Closed
opened 2026-04-08 16:50:55 +03:00 by zhus · 9 comments
Owner

Originally created by @Extroonie on GitHub (Jan 9, 2024).
Original GitHub issue: https://github.com/sigoden/dufs/issues/340

Problem

It seems like I cannot upload files larger than 1 MB.

image

Dufs config:

serve-path: 'files'
bind: 0.0.0.0
port: 1351
path-prefix:
hidden:
  - tmp
  - '*.log'
  - '*.lock'
auth:
  - user:pass@/:rw
  - '@/'  # According to the YAML spec, quoting is required.
allow-all: false
allow-upload: true
allow-delete: true
allow-search: true
allow-symlink: true
allow-archive: true
enable-cors: true
render-index: true
render-try-index: true
render-spa: true
assets:
log-format: '$remote_addr "$request" $status $http_user_agent'
compress: low
tls-cert:
tls-key:

Log

image

Environment:

  • Dufs version: 0.38.0
  • Browser/Webdav Info: Brave and Firefox
  • OS Info: Linux Mint 21.2
Originally created by @Extroonie on GitHub (Jan 9, 2024). Original GitHub issue: https://github.com/sigoden/dufs/issues/340 **Problem** It seems like I cannot upload files larger than 1 MB. ![image](https://github.com/sigoden/dufs/assets/42417143/8a87d60c-7d9e-42b5-abb0-46da668d55f5) Dufs config: ```yaml serve-path: 'files' bind: 0.0.0.0 port: 1351 path-prefix: hidden: - tmp - '*.log' - '*.lock' auth: - user:pass@/:rw - '@/' # According to the YAML spec, quoting is required. allow-all: false allow-upload: true allow-delete: true allow-search: true allow-symlink: true allow-archive: true enable-cors: true render-index: true render-try-index: true render-spa: true assets: log-format: '$remote_addr "$request" $status $http_user_agent' compress: low tls-cert: tls-key: ``` **Log** ![image](https://github.com/sigoden/dufs/assets/42417143/c03fe68e-1029-4c50-8ea0-e71c764a1816) **Environment:** - Dufs version: 0.38.0 - Browser/Webdav Info: Brave and Firefox - OS Info: Linux Mint 21.2
zhus closed this issue 2026-04-08 16:50:55 +03:00
Author
Owner

@sigoden commented on GitHub (Jan 10, 2024):

Every file uploading generates a PUT request log, but your log shows that dufs didn't receive any PUT requests at all, which means dufs didn't receive the upload request at all.

2024-01-09T23:35:48Z INFO - 192.168.8.8 "GET /tmp/" 200 Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
2024-01-09T23:35:55Z INFO - 192.168.8.8 "WRITEABLE /tmp/" 200 Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
2024-01-09T23:35:55Z INFO - 192.168.8.8 "PUT /tmp/aichat.mp4" 201 Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36

Please open the browser console (F12) to debug and see what's going on. @Extroonie

<!-- gh-comment-id:1883964155 --> @sigoden commented on GitHub (Jan 10, 2024): Every file uploading generates a `PUT` request log, but your log shows that dufs didn't receive any `PUT` requests at all, which means dufs didn't receive the upload request at all. ``` 2024-01-09T23:35:48Z INFO - 192.168.8.8 "GET /tmp/" 200 Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 2024-01-09T23:35:55Z INFO - 192.168.8.8 "WRITEABLE /tmp/" 200 Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 2024-01-09T23:35:55Z INFO - 192.168.8.8 "PUT /tmp/aichat.mp4" 201 Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 ``` Please open the browser console (F12) to debug and see what's going on. @Extroonie
Author
Owner

@Extroonie commented on GitHub (Jan 10, 2024):

Hi, this is what's happening:

image

<!-- gh-comment-id:1884654906 --> @Extroonie commented on GitHub (Jan 10, 2024): Hi, this is what's happening: ![image](https://github.com/sigoden/dufs/assets/42417143/5bbcfff7-efde-48cb-b4c7-4d47ba4c65e1)
Author
Owner

@sigoden commented on GitHub (Jan 10, 2024):

Dufs never raise 413 error. are you using proxy service above dufs? @Extroonie

<!-- gh-comment-id:1884685565 --> @sigoden commented on GitHub (Jan 10, 2024): Dufs never raise 413 error. are you using proxy service above dufs? @Extroonie
Author
Owner

@Extroonie commented on GitHub (Jan 10, 2024):

Yes, cloudflare, @sigoden.

<!-- gh-comment-id:1884704747 --> @Extroonie commented on GitHub (Jan 10, 2024): Yes, cloudflare, @sigoden.
Author
Owner
<!-- gh-comment-id:1884712824 --> @sigoden commented on GitHub (Jan 10, 2024): https://community.cloudflare.com/t/request-entity-too-large-413/509332/4
Author
Owner

@Extroonie commented on GitHub (Jan 10, 2024):

The file I'm trying to upload is 17 MB.

image

Edit 1: I have also verified that the upload size limit is 100 MB through the cloudflare dashboard:

image

Edit 2: It seems like I can't upload a 1 MB file either:

image

image

<!-- gh-comment-id:1884717594 --> @Extroonie commented on GitHub (Jan 10, 2024): The file I'm trying to upload is 17 MB. ![image](https://github.com/sigoden/dufs/assets/42417143/d3b8489a-0c1a-49f1-a268-ed9e728200bc) Edit 1: I have also verified that the upload size limit is 100 MB through the cloudflare dashboard: ![image](https://github.com/sigoden/dufs/assets/42417143/5cbf2a3e-6401-45d2-b7fa-b50a3644c8fe) Edit 2: It seems like I can't upload a 1 MB file either: ![image](https://github.com/sigoden/dufs/assets/42417143/4afd1faf-f7e4-42f7-a97a-00ed68c33413) ![image](https://github.com/sigoden/dufs/assets/42417143/440f43fc-95e5-4f83-b1a5-d8df52a3893c)
Author
Owner

@sigoden commented on GitHub (Jan 10, 2024):

dufs did not receive the request, which was blocked by cloudflare,
I'm not familiar with cloudflare. You have to figure it out yourself.

<!-- gh-comment-id:1884735510 --> @sigoden commented on GitHub (Jan 10, 2024): dufs did not receive the request, which was blocked by cloudflare, I'm not familiar with cloudflare. You have to figure it out yourself.
Author
Owner

@Extroonie commented on GitHub (Jan 10, 2024):

I see. Thanks!

Edit: I fixed it by setting client_max_body_size 100M; in ngnix under server.

<!-- gh-comment-id:1884737086 --> @Extroonie commented on GitHub (Jan 10, 2024): I see. Thanks! Edit: I fixed it by setting `client_max_body_size 100M;` in ngnix under `server`.
Author
Owner

@P4r4n01dB34r commented on GitHub (Jun 10, 2025):

Hi @sigoden!
I am getting the same error and i am proxying dufs behind cloudflare tunnel, and from the logs as for you the put request does not appear if i upload a file that is large than 100MB, there are some solutions to this problem?

Thank you

<!-- gh-comment-id:2957907531 --> @P4r4n01dB34r commented on GitHub (Jun 10, 2025): Hi @sigoden! I am getting the same error and i am proxying dufs behind cloudflare tunnel, and from the logs as for you the put request does not appear if i upload a file that is large than 100MB, there are some solutions to this problem? Thank you
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sigoden/dufs#181