-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Some files fail to upload into S3 with err 500 when upload relay is disabled #3265
Copy link
Copy link
Closed
Labels
Milestone
Description
Describe the bug
Cloudreve returns a 500 error code when uploading files with some extensions w/o upload relay: *.txt, *.png, *.jpg, *.yml, *.pdf, *.json, *.7z and perhaps other that i didn't tested for. Other files such as mp4, tar.zst, tar.gz work fine.
To Reproduce
Steps to reproduce the behavior:
0. Make sure upload relay is disabled
- Open Cloudreve's homepage
- Drag and drop file with one of listed above extensions
- After upload completion server will return error 500 with a message "Request failed with status code 500"
Expected behavior
File with any extension should be uploaded without an error
Screenshots
Desktop:
- OS: Bazzite
- Browser: Zen Browser (based of Firefox)
- Version: 43 (OS version?)
Additional context
- S3 backend: Self-hosted SeaweedFS v4.07
- File encryption (in storage policy): Enabled
- Reverse-proxy (for Cloudreve and S3): Caddy 2.10
- Cloudreve Hosted in: docker
- Download/Upload relay: disabled
- Related log entires:
cloudreve-backend | [Info] 2026-02-05 18:21:17 [/home/aaronliu/vsts/_work/2/s/pkg/queue/queue.go:362] [Cid: 27bc689c-c9fb-4ab5-9eac-d0f5f06cffb9] Task 110 status changed from "" to "queued".
cloudreve-backend | [Info] 2026-02-05 18:21:17 [/home/aaronliu/vsts/_work/2/s/pkg/queue/queue.go:203] New Task with type "upload_sentinel_check" submitted to queue "EntityRecycleQueue" by "[REDACTED]"
cloudreve-backend | [Info] 2026-02-05 18:21:17 [/home/aaronliu/vsts/_work/2/s/pkg/logging/logger.go:193] [Cid: 27bc689c-c9fb-4ab5-9eac-d0f5f06cffb9] [Incoming] 200 | 25.53817ms | 10.16.2.1 | PUT "/api/v4/file/upload"
cloudreve-backend |
cloudreve-backend |
cloudreve-backend | 2026/02/05 18:21:18 [Recovery] 2026/02/05 - 18:21:18 panic recovered:
cloudreve-backend | runtime error: invalid memory address or nil pointer dereference
cloudreve-backend | /home/aaronliu/vsts/_work/_tool/go/1.25.5/arm64/src/runtime/panic.go:262 (0x483378)
cloudreve-backend | /home/aaronliu/vsts/_work/_tool/go/1.25.5/arm64/src/runtime/signal_unix.go:925 (0x483348)
cloudreve-backend | /home/aaronliu/vsts/_work/2/s/pkg/filemanager/driver/s3/s3.go:425 (0x1ed6598)
cloudreve-backend | /home/aaronliu/vsts/_work/2/s/pkg/filemanager/driver/s3/s3.go:499 (0x1ed6cf0)
cloudreve-backend | /home/aaronliu/vsts/_work/2/s/pkg/filemanager/manager/upload.go:289 (0x1efba58)
cloudreve-backend | /home/aaronliu/vsts/_work/2/s/service/callback/upload.go:54 (0x1f5027c)
cloudreve-backend | /home/aaronliu/vsts/_work/2/s/routers/controllers/callback.go:19 (0x20bd9da)
cloudreve-backend | /home/aaronliu/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:192 (0xdf826d)
cloudreve-backend | /home/aaronliu/vsts/_work/2/s/middleware/auth.go:188 (0x20bdbca)
cloudreve-backend | /home/aaronliu/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:192 (0xdf826d)
cloudreve-backend | /home/aaronliu/vsts/_work/2/s/middleware/auth.go:69 (0x20c8ea7)
cloudreve-backend | /home/aaronliu/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:192 (0xdf826d)
cloudreve-backend | /home/aaronliu/go/pkg/mod/github.com/gin-contrib/[email protected]/sessions.go:54 (0x2077764)
cloudreve-backend | /home/aaronliu/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:192 (0xdf826d)
cloudreve-backend | /home/aaronliu/vsts/_work/2/s/middleware/frontend.go:49 (0x20770ed)
cloudreve-backend | /home/aaronliu/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:192 (0xdf826d)
cloudreve-backend | /home/aaronliu/vsts/_work/2/s/middleware/share_preview.go:87 (0x20c76d4)
cloudreve-backend | /home/aaronliu/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:192 (0xdf826d)
cloudreve-backend | /home/aaronliu/vsts/_work/2/s/middleware/common.go:150 (0x20c7d24)
cloudreve-backend | /home/aaronliu/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:192 (0xdf826d)
cloudreve-backend | /home/aaronliu/vsts/_work/2/s/middleware/common.go:126 (0x209df04)
cloudreve-backend | /home/aaronliu/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:192 (0xdf826d)
cloudreve-backend | /home/aaronliu/go/pkg/mod/github.com/gin-gonic/[email protected]/recovery.go:92 (0xe067b0)
cloudreve-backend | /home/aaronliu/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:192 (0xdf826d)
cloudreve-backend | /home/aaronliu/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:689 (0xe050d4)
cloudreve-backend | /home/aaronliu/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:643 (0xe04a6c)
cloudreve-backend | /home/aaronliu/vsts/_work/_tool/go/1.25.5/arm64/src/net/http/server.go:3340 (0x7bfe8d)
cloudreve-backend | /home/aaronliu/vsts/_work/_tool/go/1.25.5/arm64/src/net/http/server.go:2109 (0x79e704)
cloudreve-backend | /home/aaronliu/vsts/_work/_tool/go/1.25.5/arm64/src/runtime/asm_amd64.s:1693 (0x489240)
cloudreve-backend |
cloudreve-backend | [Info] 2026-02-05 18:21:18 [/home/aaronliu/vsts/_work/2/s/pkg/queue/queue.go:362] [Cid: 68473ae8-8289-4e2e-86a3-ec8960b583eb] Task 111 status changed from "" to "queued".
cloudreve-backend | [Info] 2026-02-05 18:21:18 [/home/aaronliu/vsts/_work/2/s/pkg/queue/queue.go:203] New Task with type "explicit_entity_recycle" submitted to queue "EntityRecycleQueue" by "[REDACTED]"
cloudreve-backend | [Info] 2026-02-05 18:21:18 [/home/aaronliu/vsts/_work/2/s/pkg/logging/logger.go:193] [Cid: 68473ae8-8289-4e2e-86a3-ec8960b583eb] [Incoming] 200 | 15.549307ms | 10.16.2.1 | DELETE "/api/v4/file/upload"
cloudreve-backend | [Info] 2026-02-05 18:21:19 [/home/aaronliu/vsts/_work/2/s/pkg/logging/logger.go:193] [Cid: ffd6ff13-0891-4de8-ad03-f0208ab4cdcb] [Incoming] 200 | 1.309263ms | 10.16.2.1 | GET "/api/v4/user/capacity"
cloudreve-backend | [Info] 2026-02-05 18:21:19 [/home/aaronliu/vsts/_work/2/s/pkg/logging/logger.go:193] [Cid: 34323cba-bf3f-420d-a46f-ec9a2d2b77d8] [Incoming] 200 | 11.937704ms | 10.16.2.1 | GET "/api/v4/file?uri=cloudreve:%2F%2Fmy&page=0"
What I've tried to do already
- Disabling and enabling "Proxy thumbnail generation" and "Proxy media extraction" in policy settings
- Disabling file encryption in policy settings
- Disabling and enabling all the generators and extractors in Settings > Media processing
For whatever reason enabling upload relay allows uploading all files without an error. Though I'd like to use direct upload to S3 as this provide significant speed improvement over upload relay.
Reactions are currently unavailable
