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): error returned when uploading a file that existed #5920

Merged
merged 1 commit into from
Jan 20, 2024

Conversation

EchoResponse
Copy link
Contributor

上传文件时,若曲奇云端存在相同的文件信息摘要(md5/sha),则不必进行实际上传,曲奇会自动创建或恢复文件;/api/upload/v1/file/init接口会返回文件的node_id node_name parent_id,且exist为true,并不再返回上传接口的token

以下为两种不同情况下的/api/upload/v1/file/init接口响应

  • 曲奇云端已存在:
    1705728329986
  • 曲奇云端不存在:
    1705728464537

@anwen-anyi
Copy link
Contributor

已测试 上次提交的问题已修复


images

以下是新问题无论是之前的代码还是这次新提交的代码,查看图片都无法查看(上次木有来得及反馈还这次就提交新的了 大佬修复的他快啦~)

image

�[37mDEBU�[0m[2024-01-20 19:21:16]/source/server/middlewares/auth.go:72 github.com/alist-org/alist/v3/server/middlewares.Auth() use login token: &{ID:1 Username:admin PwdHash:49c18cd84f01185615e7ec035fedfc5c7292ce37c8d84761064b034d9fe47e1f PwdTS:1703574958 Salt:tcifiCqAM55BpsHq Password: BasePath:/ Role:2 Disabled:false Permission:0 OtpSecret: SsoID: Authn:} 
�[37mDEBU�[0m[2024-01-20 19:21:16]/source/internal/op/path.go:25 github.com/alist-org/alist/v3/internal/op.GetStorageAndActualPath() use storage:  /曲奇phone                       
�[37mDEBU�[0m[2024-01-20 19:21:16]/source/internal/op/fs.go:167 github.com/alist-org/alist/v3/internal/op.Get() op.Get /images/2021-03-06_20.22.56.png       
�[37mDEBU�[0m[2024-01-20 19:21:16]/source/internal/op/fs.go:108 github.com/alist-org/alist/v3/internal/op.List() op.List /images                              
�[37mDEBU�[0m[2024-01-20 19:21:16]/source/internal/op/fs.go:112 github.com/alist-org/alist/v3/internal/op.List() use cache when list /images                  
�[37mDEBU�[0m[2024-01-20 19:21:16]/source/internal/op/path.go:25 github.com/alist-org/alist/v3/internal/op.GetStorageAndActualPath() use storage:  /曲奇phone                       
�[37mDEBU�[0m[2024-01-20 19:21:16]/source/internal/op/path.go:25 github.com/alist-org/alist/v3/internal/op.GetStorageAndActualPath() use storage:  /曲奇phone                       
�[37mDEBU�[0m[2024-01-20 19:21:16]/source/internal/op/fs.go:108 github.com/alist-org/alist/v3/internal/op.List() op.List /images                              
�[37mDEBU�[0m[2024-01-20 19:21:16]/source/internal/op/fs.go:112 github.com/alist-org/alist/v3/internal/op.List() use cache when list /images                  
[GIN] 2024/01/20 - 19:21:16 | 200 |      1.1273ms |  192.168.31.103 | POST     "/api/fs/get"
�[37mDEBU�[0m[2024-01-20 19:21:16]/source/internal/op/path.go:25 github.com/alist-org/alist/v3/internal/op.GetStorageAndActualPath() use storage:  /曲奇phone                       
�[37mDEBU�[0m[2024-01-20 19:21:16]/source/internal/op/path.go:25 github.com/alist-org/alist/v3/internal/op.GetStorageAndActualPath() use storage:  /曲奇phone                       
�[37mDEBU�[0m[2024-01-20 19:21:16]/source/internal/op/fs.go:167 github.com/alist-org/alist/v3/internal/op.Get() op.Get /images/2021-03-06_20.22.56.png       
�[37mDEBU�[0m[2024-01-20 19:21:16]/source/internal/op/fs.go:108 github.com/alist-org/alist/v3/internal/op.List() op.List /images                              
�[37mDEBU�[0m[2024-01-20 19:21:16]/source/internal/op/fs.go:112 github.com/alist-org/alist/v3/internal/op.List() use cache when list /images                  
�[31mERRO�[0m[2024-01-20 19:21:16]/source/server/common/common.go:43 github.com/alist-org/alist/v3/server/common.ErrorWithDataResp() Get "": unsupported protocol scheme ""       
[GIN] 2024/01/20 - 19:21:16 | 200 |    169.9464ms |  192.168.31.103 | GET      "/p/曲奇phone/images/2021-03-06_20.22.56.png?sign=Yh3NuWaBMfWvBNXRlzXdZmgHM6npSwGwt1OyTwLQ0Ds=:0"

video

还有视频也无法播放
image

�[37mDEBU�[0m[2024-01-20 19:29:25]/source/server/middlewares/auth.go:72 github.com/alist-org/alist/v3/server/middlewares.Auth() use login token: &{ID:1 Username:admin PwdHash:49c18cd84f01185615e7ec035fedfc5c7292ce37c8d84761064b034d9fe47e1f PwdTS:1703574958 Salt:tcifiCqAM55BpsHq Password: BasePath:/ Role:2 Disabled:false Permission:0 OtpSecret: SsoID: Authn:} 
�[37mDEBU�[0m[2024-01-20 19:29:25]/source/internal/op/path.go:25 github.com/alist-org/alist/v3/internal/op.GetStorageAndActualPath() use storage:  /曲奇phone                       
�[37mDEBU�[0m[2024-01-20 19:29:25]/source/internal/op/fs.go:167 github.com/alist-org/alist/v3/internal/op.Get() op.Get /video/夸克网盘功能介绍.mp4                   
�[37mDEBU�[0m[2024-01-20 19:29:25]/source/internal/op/fs.go:108 github.com/alist-org/alist/v3/internal/op.List() op.List /video                               
�[37mDEBU�[0m[2024-01-20 19:29:25]/source/internal/op/fs.go:112 github.com/alist-org/alist/v3/internal/op.List() use cache when list /video                   
�[37mDEBU�[0m[2024-01-20 19:29:25]/source/internal/op/path.go:25 github.com/alist-org/alist/v3/internal/op.GetStorageAndActualPath() use storage:  /曲奇phone                       
�[37mDEBU�[0m[2024-01-20 19:29:25]/source/internal/op/path.go:25 github.com/alist-org/alist/v3/internal/op.GetStorageAndActualPath() use storage:  /曲奇phone                       
�[37mDEBU�[0m[2024-01-20 19:29:25]/source/internal/op/fs.go:108 github.com/alist-org/alist/v3/internal/op.List() op.List /video                               
�[37mDEBU�[0m[2024-01-20 19:29:25]/source/internal/op/fs.go:112 github.com/alist-org/alist/v3/internal/op.List() use cache when list /video                   
[GIN] 2024/01/20 - 19:29:25 | 200 |      1.9937ms |  192.168.31.103 | POST     "/api/fs/get"
�[37mDEBU�[0m[2024-01-20 19:29:25]/source/internal/op/path.go:25 github.com/alist-org/alist/v3/internal/op.GetStorageAndActualPath() use storage:  /曲奇phone                       
�[37mDEBU�[0m[2024-01-20 19:29:25]/source/internal/op/path.go:25 github.com/alist-org/alist/v3/internal/op.GetStorageAndActualPath() use storage:  /曲奇phone                       
�[37mDEBU�[0m[2024-01-20 19:29:25]/source/internal/op/fs.go:167 github.com/alist-org/alist/v3/internal/op.Get() op.Get /video/夸克网盘功能介绍.mp4                   
�[37mDEBU�[0m[2024-01-20 19:29:25]/source/internal/op/fs.go:108 github.com/alist-org/alist/v3/internal/op.List() op.List /video                               
�[37mDEBU�[0m[2024-01-20 19:29:25]/source/internal/op/fs.go:112 github.com/alist-org/alist/v3/internal/op.List() use cache when list /video                   
�[31mERRO�[0m[2024-01-20 19:29:25]/source/server/common/common.go:43 github.com/alist-org/alist/v3/server/common.ErrorWithDataResp() Get "": unsupported protocol scheme ""       
[GIN] 2024/01/20 - 19:29:25 | 200 |    111.5999ms |  192.168.31.103 | GET      "/p/曲奇phone/video/夸克网盘功能介绍.mp4?sign=FqXgwHr09bXgb76qCwSDjc4r4xn3ktJP2UcUjdy5Yv8=:0"
�[37mDEBU�[0m[2024-01-20 19:29:27]/source/internal/op/path.go:25 github.com/alist-org/alist/v3/internal/op.GetStorageAndActualPath() use storage:  /曲奇phone                       
�[37mDEBU�[0m[2024-01-20 19:29:27]/source/internal/op/path.go:25 github.com/alist-org/alist/v3/internal/op.GetStorageAndActualPath() use storage:  /曲奇phone                       
�[37mDEBU�[0m[2024-01-20 19:29:27]/source/internal/op/fs.go:167 github.com/alist-org/alist/v3/internal/op.Get() op.Get /video/夸克网盘功能介绍.mp4                   
�[37mDEBU�[0m[2024-01-20 19:29:27]/source/internal/op/fs.go:108 github.com/alist-org/alist/v3/internal/op.List() op.List /video                               
�[37mDEBU�[0m[2024-01-20 19:29:27]/source/internal/op/fs.go:112 github.com/alist-org/alist/v3/internal/op.List() use cache when list /video                   
�[31mERRO�[0m[2024-01-20 19:29:27]/source/server/common/common.go:43 github.com/alist-org/alist/v3/server/common.ErrorWithDataResp() Get "": unsupported protocol scheme ""       
[GIN] 2024/01/20 - 19:29:27 | 200 |     89.0547ms |  192.168.31.103 | GET      "/p/曲奇phone/video/夸克网盘功能介绍.mp4?sign=FqXgwHr09bXgb76qCwSDjc4r4xn3ktJP2UcUjdy5Yv8=:0"
�[37mDEBU�[0m[2024-01-20 19:29:28]/source/internal/op/path.go:25 github.com/alist-org/alist/v3/internal/op.GetStorageAndActualPath() use storage:  /曲奇phone                       
�[37mDEBU�[0m[2024-01-20 19:29:28]/source/internal/op/path.go:25 github.com/alist-org/alist/v3/internal/op.GetStorageAndActualPath() use storage:  /曲奇phone                       
�[37mDEBU�[0m[2024-01-20 19:29:28]/source/internal/op/fs.go:167 github.com/alist-org/alist/v3/internal/op.Get() op.Get /video/夸克网盘功能介绍.mp4                   
�[37mDEBU�[0m[2024-01-20 19:29:28]/source/internal/op/fs.go:108 github.com/alist-org/alist/v3/internal/op.List() op.List /video                               
�[37mDEBU�[0m[2024-01-20 19:29:28]/source/internal/op/fs.go:112 github.com/alist-org/alist/v3/internal/op.List() use cache when list /video                   
�[31mERRO�[0m[2024-01-20 19:29:28]/source/server/common/common.go:43 github.com/alist-org/alist/v3/server/common.ErrorWithDataResp() Get "": unsupported protocol scheme ""       
[GIN] 2024/01/20 - 19:29:28 | 200 |     86.8456ms |  192.168.31.103 | GET      "/p/曲奇phone/video/夸克网盘功能介绍.mp4?sign=FqXgwHr09bXgb76qCwSDjc4r4xn3ktJP2UcUjdy5Yv8=:0"
�[37mDEBU�[0m[2024-01-20 19:29:29]/source/internal/op/path.go:25 github.com/alist-org/alist/v3/internal/op.GetStorageAndActualPath() use storage:  /曲奇phone                       
�[37mDEBU�[0m[2024-01-20 19:29:29]/source/internal/op/path.go:25 github.com/alist-org/alist/v3/internal/op.GetStorageAndActualPath() use storage:  /曲奇phone                       
�[37mDEBU�[0m[2024-01-20 19:29:29]/source/internal/op/fs.go:167 github.com/alist-org/alist/v3/internal/op.Get() op.Get /video/夸克网盘功能介绍.mp4                   
�[37mDEBU�[0m[2024-01-20 19:29:29]/source/internal/op/fs.go:108 github.com/alist-org/alist/v3/internal/op.List() op.List /video                               
�[37mDEBU�[0m[2024-01-20 19:29:29]/source/internal/op/fs.go:112 github.com/alist-org/alist/v3/internal/op.List() use cache when list /video                   
�[31mERRO�[0m[2024-01-20 19:29:29]/source/server/common/common.go:43 github.com/alist-org/alist/v3/server/common.ErrorWithDataResp() Get "": unsupported protocol scheme ""       
[GIN] 2024/01/20 - 19:29:29 | 200 |     84.2697ms |  192.168.31.103 | GET      "/p/曲奇phone/video/夸克网盘功能介绍.mp4?sign=FqXgwHr09bXgb76qCwSDjc4r4xn3ktJP2UcUjdy5Yv8=:0"
�[37mDEBU�[0m[2024-01-20 19:29:30]/source/internal/op/path.go:25 github.com/alist-org/alist/v3/internal/op.GetStorageAndActualPath() use storage:  /曲奇phone                       
�[37mDEBU�[0m[2024-01-20 19:29:30]/source/internal/op/path.go:25 github.com/alist-org/alist/v3/internal/op.GetStorageAndActualPath() use storage:  /曲奇phone                       
�[37mDEBU�[0m[2024-01-20 19:29:30]/source/internal/op/fs.go:167 github.com/alist-org/alist/v3/internal/op.Get() op.Get /video/夸克网盘功能介绍.mp4                   
�[37mDEBU�[0m[2024-01-20 19:29:30]/source/internal/op/fs.go:108 github.com/alist-org/alist/v3/internal/op.List() op.List /video                               
�[37mDEBU�[0m[2024-01-20 19:29:30]/source/internal/op/fs.go:112 github.com/alist-org/alist/v3/internal/op.List() use cache when list /video                   
�[31mERRO�[0m[2024-01-20 19:29:30]/source/server/common/common.go:43 github.com/alist-org/alist/v3/server/common.ErrorWithDataResp() Get "": unsupported protocol scheme ""       
[GIN] 2024/01/20 - 19:29:30 | 200 |     85.1288ms |  192.168.31.103 | GET      "/p/曲奇phone/video/夸克网盘功能介绍.mp4?sign=FqXgwHr09bXgb76qCwSDjc4r4xn3ktJP2UcUjdy5Yv8=:0"
�[37mDEBU�[0m[2024-01-20 19:29:31]/source/internal/op/path.go:25 github.com/alist-org/alist/v3/internal/op.GetStorageAndActualPath() use storage:  /曲奇phone                       
�[37mDEBU�[0m[2024-01-20 19:29:31]/source/internal/op/path.go:25 github.com/alist-org/alist/v3/internal/op.GetStorageAndActualPath() use storage:  /曲奇phone                       
�[37mDEBU�[0m[2024-01-20 19:29:31]/source/internal/op/fs.go:167 github.com/alist-org/alist/v3/internal/op.Get() op.Get /video/夸克网盘功能介绍.mp4                   
�[37mDEBU�[0m[2024-01-20 19:29:31]/source/internal/op/fs.go:108 github.com/alist-org/alist/v3/internal/op.List() op.List /video                               
�[37mDEBU�[0m[2024-01-20 19:29:31]/source/internal/op/fs.go:112 github.com/alist-org/alist/v3/internal/op.List() use cache when list /video                   
�[31mERRO�[0m[2024-01-20 19:29:31]/source/server/common/common.go:43 github.com/alist-org/alist/v3/server/common.ErrorWithDataResp() Get "": unsupported protocol scheme ""       
[GIN] 2024/01/20 - 19:29:31 | 200 |     86.7344ms |  192.168.31.103 | GET      "/p/曲奇phone/video/夸克网盘功能介绍.mp4?sign=FqXgwHr09bXgb76qCwSDjc4r4xn3ktJP2UcUjdy5Yv8=:0"

在其它云盘里面是可以查看的上面的视频,虽然是302,但是我搭建在本地的AList,视频就是50MB的测试视频
image

哪怕用Web代理模式播放也是木有问题的~
image

@EchoResponse
Copy link
Contributor Author

EchoResponse commented Jan 20, 2024 via email

@anwen-anyi
Copy link
Contributor

""没有获取到文件的访问直链而请求了空链接,那几个文件在访问时真实存在于曲奇吗?/images/2021-03-06_20.22.56.png /video/夸克网盘功能介绍.mp4`

肯定是在曲奇吖
image

@anwen-anyi
Copy link
Contributor

图片、视频 下载也不行
image

下载视频和图片都会错误,其它exe、rar、ipa等文件倒是没问题(具体视频,可能需要下载观看QQ录制的编码有问题似乎不能直接看)

1705752739407.mp4

@EchoResponse
Copy link
Contributor Author

@anwen-anyi 能用你账号测试一下吗,我测试alist/曲奇上传的视频和图片,播放和下载都没有遇到类似的情况呀。我邮箱1599424406ge@gmail.com

@anwen-anyi
Copy link
Contributor

@anwen-anyi 能用你账号测试一下吗,我测试alist/曲奇上传的视频和图片,播放和下载都没有遇到类似的情况呀。我邮箱1599424406ge@gmail.com

已发送 收到了吗?

@EchoResponse
Copy link
Contributor Author

已发送 收到了吗?

收到了收到了

@EchoResponse
Copy link
Contributor Author

@anwen-anyi
已经找到问题了,非会员账号的视频/音频/图片等资源无法通过驱动里面的/api/doc/getDoc接口获取下载链接,我尽快修复

@xhofe xhofe merged commit 85a28d9 into AlistGo:main Jan 20, 2024
3 checks passed
EtherealAO pushed a commit to EtherealAO/alist that referenced this pull request Apr 12, 2024
EtherealAO pushed a commit to EtherealAO/alist that referenced this pull request Apr 12, 2024
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