Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(quqi): file extension duplication when rename and some missing form parameters #5910

Merged
merged 10 commits into from
Jan 19, 2024

Conversation

EchoResponse
Copy link
Contributor

修复问题:

  • 修复重命名时扩展名重复问题: 在曲奇的API中,文件名与扩展名分离返回,导致文件名不包括扩展名。在调用曲奇重命名接口时,新文件名不应包括扩展名,否则会导致扩展名重复
  • 修复部分接口请求表单参数缺失问题:经过测试,在复制/移动文件时缺少client_id表单参数时会操作失败,且一定时间内无法调用其他接口
  • 优化登录时错误信息返回

@xhofe xhofe merged commit a8c900d into AlistGo:main Jan 19, 2024
3 checks passed
@anwen-anyi
Copy link
Contributor

曲奇上传
image

但是文件还是上传上来了 😹
image

使用的版本是 https://github.com/alist-org/alist/actions/runs/7580051878 这里下载的

�[37mDEBU�[0m[2024-01-19 17:25:57]/source/internal/op/fs.go:167 github.com/alist-org/alist/v3/internal/op.Get() op.Get /file/rustdesk-1.1.9.exe              
�[37mDEBU�[0m[2024-01-19 17:25:57]/source/internal/op/fs.go:108 github.com/alist-org/alist/v3/internal/op.List() op.List /file                                
�[37mDEBU�[0m[2024-01-19 17:25:57]/source/internal/op/fs.go:112 github.com/alist-org/alist/v3/internal/op.List() use cache when list /file                    
�[37mDEBU�[0m[2024-01-19 17:25:57]/source/internal/op/fs.go:228 github.com/alist-org/alist/v3/internal/op.Get() cant find obj with name: rustdesk-1.1.9.exe  
�[37mDEBU�[0m[2024-01-19 17:25:57]/source/internal/op/fs.go:167 github.com/alist-org/alist/v3/internal/op.Get() op.Get /file                                 
�[37mDEBU�[0m[2024-01-19 17:25:57]/source/internal/op/fs.go:108 github.com/alist-org/alist/v3/internal/op.List() op.List /                                    
�[37mDEBU�[0m[2024-01-19 17:25:57]/source/internal/op/fs.go:112 github.com/alist-org/alist/v3/internal/op.List() use cache when list /                        
�[37mDEBU�[0m[2024-01-19 17:25:57]/source/internal/op/fs.go:167 github.com/alist-org/alist/v3/internal/op.Get() op.Get /file                                 
�[37mDEBU�[0m[2024-01-19 17:25:57]/source/internal/op/fs.go:108 github.com/alist-org/alist/v3/internal/op.List() op.List /                                    
�[37mDEBU�[0m[2024-01-19 17:25:57]/source/internal/op/fs.go:112 github.com/alist-org/alist/v3/internal/op.List() use cache when list /                        
�[37mDEBU�[0m[2024-01-19 17:25:58]/source/internal/op/fs.go:561 github.com/alist-org/alist/v3/internal/op.Put() put file [rustdesk-1.1.9.exe] done           
�[31mERRO�[0m[2024-01-19 17:25:58]/source/internal/fs/fs.go:99 github.com/alist-org/alist/v3/internal/fs.PutDirectly() failed put /曲奇云盘/file/: INVALID_INPUT
github.com/alist-org/alist/v3/internal/op.Put
	/source/internal/op/fs.go:580
github.com/alist-org/alist/v3/internal/fs.putDirectly
	/source/internal/fs/put.go:70
github.com/alist-org/alist/v3/internal/fs.PutDirectly
	/source/internal/fs/fs.go:97
github.com/alist-org/alist/v3/server/handles.FsStream
	/source/server/handles/fsup.go:65
github.com/gin-gonic/gin.(*Context).Next
	/go/pkg/mod/github.com/gin-gonic/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/context.go:174
github.com/gin-gonic/gin.CustomRecoveryWithWriter.func1
	/go/pkg/mod/github.com/gin-gonic/[email protected]/recovery.go:102
github.com/gin-gonic/gin.(*Context).Next
	/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:174
github.com/gin-gonic/gin.LoggerWithConfig.func1
	/go/pkg/mod/github.com/gin-gonic/[email protected]/logger.go:240
github.com/gin-gonic/gin.(*Context).Next
	/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:174
github.com/gin-gonic/gin.(*Engine).handleHTTPRequest
	/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:620
github.com/gin-gonic/gin.(*Engine).ServeHTTP
	/go/pkg/mod/github.com/gin-gonic/[email protected]/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 
[GIN] 2024/01/19 - 17:25:58 | 200 |    790.2336ms |  192.168.31.103 | PUT      "/api/fs/put"

@EchoResponse
Copy link
Contributor Author

曲奇上传 image

但是文件还是上传上来了 😹 image

使用的版本是 https://github.com/alist-org/alist/actions/runs/7580051878 这里下载的

�[37mDEBU�[0m[2024-01-19 17:25:57]/source/internal/op/fs.go:167 github.com/alist-org/alist/v3/internal/op.Get() op.Get /file/rustdesk-1.1.9.exe              
�[37mDEBU�[0m[2024-01-19 17:25:57]/source/internal/op/fs.go:108 github.com/alist-org/alist/v3/internal/op.List() op.List /file                                
�[37mDEBU�[0m[2024-01-19 17:25:57]/source/internal/op/fs.go:112 github.com/alist-org/alist/v3/internal/op.List() use cache when list /file                    
�[37mDEBU�[0m[2024-01-19 17:25:57]/source/internal/op/fs.go:228 github.com/alist-org/alist/v3/internal/op.Get() cant find obj with name: rustdesk-1.1.9.exe  
�[37mDEBU�[0m[2024-01-19 17:25:57]/source/internal/op/fs.go:167 github.com/alist-org/alist/v3/internal/op.Get() op.Get /file                                 
�[37mDEBU�[0m[2024-01-19 17:25:57]/source/internal/op/fs.go:108 github.com/alist-org/alist/v3/internal/op.List() op.List /                                    
�[37mDEBU�[0m[2024-01-19 17:25:57]/source/internal/op/fs.go:112 github.com/alist-org/alist/v3/internal/op.List() use cache when list /                        
�[37mDEBU�[0m[2024-01-19 17:25:57]/source/internal/op/fs.go:167 github.com/alist-org/alist/v3/internal/op.Get() op.Get /file                                 
�[37mDEBU�[0m[2024-01-19 17:25:57]/source/internal/op/fs.go:108 github.com/alist-org/alist/v3/internal/op.List() op.List /                                    
�[37mDEBU�[0m[2024-01-19 17:25:57]/source/internal/op/fs.go:112 github.com/alist-org/alist/v3/internal/op.List() use cache when list /                        
�[37mDEBU�[0m[2024-01-19 17:25:58]/source/internal/op/fs.go:561 github.com/alist-org/alist/v3/internal/op.Put() put file [rustdesk-1.1.9.exe] done           
�[31mERRO�[0m[2024-01-19 17:25:58]/source/internal/fs/fs.go:99 github.com/alist-org/alist/v3/internal/fs.PutDirectly() failed put /曲奇云盘/file/: INVALID_INPUT
github.com/alist-org/alist/v3/internal/op.Put
	/source/internal/op/fs.go:580
github.com/alist-org/alist/v3/internal/fs.putDirectly
	/source/internal/fs/put.go:70
github.com/alist-org/alist/v3/internal/fs.PutDirectly
	/source/internal/fs/fs.go:97
github.com/alist-org/alist/v3/server/handles.FsStream
	/source/server/handles/fsup.go:65
github.com/gin-gonic/gin.(*Context).Next
	/go/pkg/mod/github.com/gin-gonic/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/context.go:174
github.com/gin-gonic/gin.CustomRecoveryWithWriter.func1
	/go/pkg/mod/github.com/gin-gonic/[email protected]/recovery.go:102
github.com/gin-gonic/gin.(*Context).Next
	/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:174
github.com/gin-gonic/gin.LoggerWithConfig.func1
	/go/pkg/mod/github.com/gin-gonic/[email protected]/logger.go:240
github.com/gin-gonic/gin.(*Context).Next
	/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:174
github.com/gin-gonic/gin.(*Engine).handleHTTPRequest
	/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:620
github.com/gin-gonic/gin.(*Engine).ServeHTTP
	/go/pkg/mod/github.com/gin-gonic/[email protected]/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 
[GIN] 2024/01/19 - 17:25:58 | 200 |    790.2336ms |  192.168.31.103 | PUT      "/api/fs/put"

@anwen-anyi 已复现问题:曲奇上传云端已存在的文件时,本地不必再上传,曲奇会在云端进行恢复并返回新文件信息

曲奇/api/upload/v1/file/init接口应该会对文件md5和sha进行检测 1705724204731(1)

EtherealAO pushed a commit to EtherealAO/alist that referenced this pull request Apr 12, 2024
…rm parameters (AlistGo#5910)

* feat: add `quqi` driver

* change signature of request function

* specific header for every storage

* todo: real upload

* fix upload method

* fix incorrect parameters for some request function calls

* refine some form parameters to avoid potential problems

* fix file extension duplication in rename function

* improve the error message in login function

---------

Co-authored-by: Andy Hsu <[email protected]>
EtherealAO pushed a commit to EtherealAO/alist that referenced this pull request Apr 12, 2024
…rm parameters (AlistGo#5910)

* feat: add `quqi` driver

* change signature of request function

* specific header for every storage

* todo: real upload

* fix upload method

* fix incorrect parameters for some request function calls

* refine some form parameters to avoid potential problems

* fix file extension duplication in rename function

* improve the error message in login function

---------

Co-authored-by: Andy Hsu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants