Skip to content

Commit

Permalink
fix(preview): use absolute URL for local storage policy
Browse files Browse the repository at this point in the history
  • Loading branch information
HFO4 committed Jun 11, 2023
1 parent fb166fb commit 173ca6c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions service/explorer/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 173ca6c

Please sign in to comment.