* fix: correct the download url got by Cloudreve driver * fix: add an condition to the correction
This commit is contained in:
@ -71,6 +71,9 @@ func (d *Cloudreve) Link(ctx context.Context, file model.Obj, args model.LinkArg
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
if strings.HasPrefix(dUrl, "/api") {
|
||||||
|
dUrl = d.Address + dUrl
|
||||||
|
}
|
||||||
return &model.Link{
|
return &model.Link{
|
||||||
URL: dUrl,
|
URL: dUrl,
|
||||||
}, nil
|
}, nil
|
||||||
|
Reference in New Issue
Block a user