[GH-ISSUE #492] Files larger than 1MB can't be uploaded #275

Closed
opened 2026-04-08 16:51:39 +03:00 by zhus · 2 comments
Owner

Originally created by @WShihan on GitHub (Nov 29, 2024).
Original GitHub issue: https://github.com/sigoden/dufs/issues/492

Problem

I can't upload files larger than 1MB; I'm sure the progress reaches 100%, but it suddenly fails.

Configuration

serve-path: '.'
bind: 0.0.0.0
port: 5010
path-prefix: /arch
hidden:
  - tmp
  - '*.log'
  - '*.lock'
  - '.git'
auth:
  - adminname:adminpassword@/:rw
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
log-format: '$remote_addr "$request" $status $http_user_agent'
log-file: ./dufs.log
compress: low

Log

2024-11-29T22:18:52+08:00 INFO - 127.0.0.1 "GET /arch/" 200 Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0
2024-11-29T22:18:54+08:00 INFO - 127.0.0.1 "GET /arch/" 200 Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0
2024-11-29T22:19:01+08:00 INFO - 127.0.0.1 "CHECKAUTH /arch/" 200 Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0

Environment Information

  • Dufs version:0.43.0
  • Browser version:Microsoft Edge 131.0.2903.70
  • OS info:Ubuntu-22.04.5 LTS
  • Proxy server: nginx-1.25.4

Thanks for your great work.

Originally created by @WShihan on GitHub (Nov 29, 2024). Original GitHub issue: https://github.com/sigoden/dufs/issues/492 **Problem** I can't upload files larger than 1MB; I'm sure the progress reaches 100%, but it suddenly fails. **Configuration** ``` serve-path: '.' bind: 0.0.0.0 port: 5010 path-prefix: /arch hidden: - tmp - '*.log' - '*.lock' - '.git' auth: - adminname:adminpassword@/:rw 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 log-format: '$remote_addr "$request" $status $http_user_agent' log-file: ./dufs.log compress: low ``` **Log** ``` 2024-11-29T22:18:52+08:00 INFO - 127.0.0.1 "GET /arch/" 200 Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0 2024-11-29T22:18:54+08:00 INFO - 127.0.0.1 "GET /arch/" 200 Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0 2024-11-29T22:19:01+08:00 INFO - 127.0.0.1 "CHECKAUTH /arch/" 200 Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0 ``` **Environment Information** - Dufs version:0.43.0 - Browser version:Microsoft Edge 131.0.2903.70 - OS info:Ubuntu-22.04.5 LTS - Proxy server: nginx-1.25.4 Thanks for your great work.
zhus closed this issue 2026-04-08 16:51:39 +03:00
Author
Owner

@sigoden commented on GitHub (Nov 30, 2024):

@WShihan

Dufs have no limit on upload file size. I think the problem lies with Nginx.

you are using Nginx as a proxy server, it has a default limit on the size of files that can be uploaded. You'll need to increase the client_max_body_size in your Nginx configuration. Here's how you can do that:

Add or modify the client_max_body_size directive to nginx configuration file:

server {
   # Other configurations...
   
   client_max_body_size 10M;  # Set this to the maximum size you want
}

If the issue is not resolved, please add a comment. Note: Your log does not include the issue request, please add it.

<!-- gh-comment-id:2508708408 --> @sigoden commented on GitHub (Nov 30, 2024): @WShihan Dufs have no limit on upload file size. I think the problem lies with Nginx. you are using Nginx as a proxy server, it has a default limit on the size of files that can be uploaded. You'll need to increase the `client_max_body_size` in your Nginx configuration. Here's how you can do that: Add or modify the `client_max_body_size` directive to nginx configuration file: ```nginx server { # Other configurations... client_max_body_size 10M; # Set this to the maximum size you want } ``` If the issue is not resolved, please add a comment. Note: Your log does not include the issue request, please add it.
Author
Owner

@luckman212 commented on GitHub (Mar 20, 2025):

I hit a similar error today (HTTP 413 error) and initially thought it was a Dufs limit. Turns out I forgot I had it behind a Cloudflare tunnel which was proxying the connection. Just leaving a comment here in case anyone ever searches for such a thing...

<!-- gh-comment-id:2741471832 --> @luckman212 commented on GitHub (Mar 20, 2025): I hit a similar error today (HTTP 413 error) and initially thought it was a Dufs limit. Turns out I forgot I had it behind a Cloudflare tunnel which was proxying the connection. Just leaving a comment here in case anyone ever searches for such a thing...
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sigoden/dufs#275