fix(preview): use absolute URL for local storage policy

pull/1741/head
Aaron Liu 2 years ago
parent fb166fb3e4
commit 173ca6cdf8

@ -227,6 +227,10 @@ func (service *FileIDService) CreateDocPreviewSession(ctx context.Context, c *gi
return serializer.Err(serializer.CodeNotSet, err.Error(), err)
}
if strings.HasPrefix(downloadURL, "/") {
downloadURL = path.Join(model.GetSiteURL().String(), downloadURL)
}
var resp serializer.DocPreviewSession
// Use WOPI preview if available

Loading…
Cancel
Save