We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
alist
Dependencies
Operational
v2.6.1
通过添加其他的 Alist 服务挂载另一个 Alist 时,如果指定挂载根目录路径不为 / (例如设置为 /ali/live),在前端调用下载的时候,后端返回的下载链接不完整,缺少目标 Alist 的根目录路径,参见 https://github.com/alist-org/alist/blob/v2/drivers/alist/driver.go#L116 ,其中的 path 缺少了 account.RootFolder。
/
/ali/live
account.RootFolder
应该返回形如 https://pan.example.com/d/ali/live/day1/2351.mp4,而实际返回了 https://pan.example.com/d/day1/2351.mp4,缺少了所挂载的根目录路径,其中 https://pan.example.com 为被挂载的 Alist 的地址
https://pan.example.com/d/ali/live/day1/2351.mp4
https://pan.example.com/d/day1/2351.mp4
https://pan.example.com
可参考修改方案如下(未调试):
func (driver Alist) Link(args base.Args, account *model.Account) (*base.Link, error) { path := args.Path path = utils.ParsePath(path) path = utils.ParsePath(account.RootFolder) + path name := utils.Base(path) flag := "d" if utils.GetFileType(filepath.Ext(path)) == conf.TEXT { flag = "p" } link := base.Link{} link.Url = fmt.Sprintf("%s/%s%s?sign=%s", account.SiteUrl, flag, path, utils.SignWithToken(name, conf.Token)) return &link, nil }
感谢 @julydate 与我一起抓到的虫~
不想暴露自己的网盘地址就不想放了
No response
The text was updated successfully, but these errors were encountered:
Thanks for opening your first issue here! Be sure to follow the issue template!
Sorry, something went wrong.
fix(native): download while root_folder is not root (fix: #1340)
f6527f1
No branches or pull requests
Please make sure of the following things
alist
and not something else(such asDependencies
orOperational
).Alist Version / Alist 版本
v2.6.1
Driver used / 使用的存储驱动
alist
Describe the bug / 问题描述
挂载另一个 Alist 时无法正常调用下载
通过添加其他的 Alist 服务挂载另一个 Alist 时,如果指定挂载根目录路径不为
/
(例如设置为/ali/live
),在前端调用下载的时候,后端返回的下载链接不完整,缺少目标 Alist 的根目录路径,参见 https://github.com/alist-org/alist/blob/v2/drivers/alist/driver.go#L116 ,其中的 path 缺少了account.RootFolder
。应该返回形如
https://pan.example.com/d/ali/live/day1/2351.mp4
,而实际返回了https://pan.example.com/d/day1/2351.mp4
,缺少了所挂载的根目录路径,其中https://pan.example.com
为被挂载的 Alist 的地址可参考修改方案如下(未调试):
感谢 @julydate 与我一起抓到的虫~
Reproduction / 复现链接
不想暴露自己的网盘地址就不想放了
Logs / 日志
No response
The text was updated successfully, but these errors were encountered: