Skip to content

Commit

Permalink
fix(cloudreve): add domain to the download url if not exists (#6339 c…
Browse files Browse the repository at this point in the history
…lose #6265)

* fix: correct the download url got by Cloudreve driver

* fix: add an condition to the correction
  • Loading branch information
tukipona committed Apr 12, 2024
1 parent c3c5181 commit 793a4ea
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/cloudreve/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ func (d *Cloudreve) Link(ctx context.Context, file model.Obj, args model.LinkArg
if err != nil {
return nil, err
}
if strings.HasPrefix(dUrl, "/api") {
dUrl = d.Address + dUrl
}
return &model.Link{
URL: dUrl,
}, nil
Expand Down

0 comments on commit 793a4ea

Please sign in to comment.