Fix: doc preview src of local storage policy starts with ":/"
This commit is contained in:
parent
3ffce1e356
commit
f180db9847
1 changed files with 3 additions and 1 deletions
|
@ -227,8 +227,10 @@ func (service *FileIDService) CreateDocPreviewSession(ctx context.Context, c *gi
|
|||
return serializer.Err(serializer.CodeNotSet, err.Error(), err)
|
||||
}
|
||||
|
||||
// For newer version of Cloudreve - Local Policy
|
||||
// When do not use a cdn, the downloadURL withouts hosts, like "/api/v3/file/download/xxx"
|
||||
if strings.HasPrefix(downloadURL, "/") {
|
||||
downloadURL = path.Join(model.GetSiteURL().String(), downloadURL)
|
||||
downloadURL = model.GetSiteURL().ResolveReference(downloadURL).String()
|
||||
}
|
||||
|
||||
var resp serializer.DocPreviewSession
|
||||
|
|
Loading…
Add table
Reference in a new issue