wopisrc

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateWopiSrc

func GenerateWopiSrc(fileRef string, cfg *config.Config) (*url.URL, error)

GenerateWopiSrc generates a WOPI src URL for the given file reference. If a proxy URL and proxy secret are configured, the URL will be generated as a jwt token that is signed with the proxy secret and contains the file reference and the WOPI src URL. Example: https://cloud.proxy.com/wopi/files/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1IjoiaHR0cHM6Ly9vY2lzLnRlYW0vd29waS9maWxlcy8iLCJmIjoiMTIzNDU2In0.6ol9PQXGKktKfAri8tsJ4X_a9rIeosJ7id6KTQW6Ui0

If no proxy URL and proxy secret are configured, the URL will be generated as a direct URL that contains the file reference. Example: https:/cloud.example.test/wopi/files/12312678470610632091729803710923

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL