API流式上传丢数据
- Lingua principale
- Go
- Stelle
- 50.2k
- Fork
- 7.9k
- Merge medio
- 7g 21h
- PR unite (30g)
- 6
Descrizione
### Please make sure of the following things
- [X] I have read the [documentation](https://alist.nn.ci).
我已经阅读了[文档](https://alist.nn.ci)。
- [X] I'm sure there are no duplicate issues or discussions.
我确定没有重复的issue或讨论。
- [X] I'm sure it's due to `AList` and not something else(such as [Network](https://alist.nn.ci/faq/howto.html#tls-handshake-timeout-read-connection-reset-by-peer-dns-lookup-failed-connect-connection-refused-client-timeout-exceeded-while-awaiting-headers-no-such-host) ,`Dependencies` or `Operational`).
我确定是`AList`的问题,而不是其他原因(例如[网络](https://alist.nn.ci/zh/faq/howto.html#tls-handshake-timeout-read-connection-reset-by-peer-dns-lookup-failed-connect-connection-refused-client-timeout-exceeded-while-awaiting-headers-no-such-host),`依赖`或`操作`)。
- [X] I'm sure this issue is not fixed in the latest version.
我确定这个问题在最新版本中没有被修复。
### AList Version / AList 版本
v3.3
### Driver used / 使用的存储驱动
Crypt
### Describe the bug / 问题描述
采用流式API上传/api/fs/put,Content-Length取的文件size,但是上传后,图像数据时丢失的,见图2.


### Reproduction / 复现链接
请看上面截图
### Config / 配置

### Logs / 日志
unexpected EOF; CreateTempFile failed
failed to create temp file
github.com/alist-org/alist/v3/internal/fs.putAsTask
/source/internal/fs/put.go:47
github.com/alist-org/alist/v3/internal/fs.PutAsTask
/source/internal/fs/fs.go:105
github.com/alist-org/alist/v3/server/handles.FsStream
/source/server/handles/fsup.go:63
github.com/gin-gonic/gin.(*Context).Next
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174
github.com/alist-org/alist/v3/server/middlewares.FsUp
/source/server/middlewares/fsup.go:43
github.com/gin-gonic/gin.(*Context).Next
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174
github.com/alist-org/alist/v3/server/middlewares.Auth
/source/server/middlewares/auth.go:73
github.com/gin-gonic/gin.(*Context).Next
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174
github.com/alist-org/alist/v3/server/middlewares.StoragesLoaded
/source/server/middlewares/check.go:14
github.com/gin-gonic/gin.(*Context).Next
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174
github.com/gin-gonic/gin.CustomRecoveryWithWriter.func1
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/recovery.go:102
github.com/gin-gonic/gin.(*Context).Next
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174
github.com/gin-gonic/gin.LoggerWithConfig.func1
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/logger.go:240
github.com/gin-gonic/gin.(*Context).Next
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174
github.com/gin-gonic/gin.(*Engine).handleHTTPRequest
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/gin.go:620
github.com/gin-gonic/gin.(*Engine).ServeHTTP
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/gin.go:576
net/http.serverHandler.ServeHTTP
/usr/local/go/src/net/http/server.go:2938
net/http.(*conn).serve
/usr/local/go/src/net/http/server.go:2009
runtime.goexit
/usr/local/go/src/runtime/asm_amd64.s:1650
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.