Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webdav #66

Merged
merged 1 commit into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions services/webdav/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ Currently, the webdav service handles request for two functionalities, which are

The webdav service provides various `GET` endpoints to get the thumbnails of a file in authenticated and unauthenticated contexts. It also provides thumbnails for spaces on different endpoints.

See the [thumbnail](https://github.com/owncloud/ocis/tree/master/services/thumbnails) service for more information about thumbnails.
See the [thumbnail](https://github.com/opencloud-eu/opencloud/tree/master/services/thumbnails) service for more information about thumbnails.

### Search

The webdav service provides access to the search functionality. It offers multiple `REPORT` endpoints for getting search results.

See the [search](https://github.com/owncloud/ocis/tree/master/services/search) service for more details about search functionality.
See the [search](https://github.com/opencloud-eu/opencloud/tree/master/services/search) service for more details about search functionality.

## Scalability

Expand Down
4 changes: 2 additions & 2 deletions services/webdav/pkg/command/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ func GetCommands(cfg *config.Config) cli.Commands {
}
}

// Execute is the entry point for the ocis-webdav command.
// Execute is the entry point for the opencloud-webdav command.
func Execute(cfg *config.Config) error {
app := clihelper.DefaultApp(&cli.App{
Name: "webdav",
Usage: "Serve WebDAV API for oCIS",
Usage: "Serve WebDAV API for OpenCloud",
Commands: GetCommands(cfg),
})

Expand Down
2 changes: 1 addition & 1 deletion services/webdav/pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type Config struct {
HTTP HTTP `yaml:"http"`

DisablePreviews bool `yaml:"disablePreviews" env:"OC_DISABLE_PREVIEWS;WEBDAV_DISABLE_PREVIEWS" desc:"Set this option to 'true' to disable rendering of thumbnails triggered via webdav access. Note that when disabled, all access to preview related webdav paths will return a 404." introductionVersion:"pre5.0"`
OcisPublicURL string `yaml:"ocis_public_url" env:"OC_URL;OC_PUBLIC_URL" desc:"URL, where oCIS is reachable for users." introductionVersion:"pre5.0"`
OpenCloudPublicURL string `yaml:"opencloud_public_url" env:"OC_URL;OC_PUBLIC_URL" desc:"URL, where OpenCloud is reachable for users." introductionVersion:"pre5.0"`
WebdavNamespace string `yaml:"webdav_namespace" env:"WEBDAV_WEBDAV_NAMESPACE" desc:"CS3 path layout to use when forwarding /webdav requests" introductionVersion:"pre5.0"`
RevaGateway string `yaml:"reva_gateway" env:"OC_REVA_GATEWAY" desc:"CS3 gateway used to look up user metadata" introductionVersion:"pre5.0"`
RevaGatewayTLSMode string `yaml:"reva_gateway_tls_mode" env:"OC_REVA_GATEWAY_TLS_MODE" desc:"TLS mode for grpc connection to the CS3 gateway endpoint. Possible values are 'off', 'insecure' and 'on'. 'off': disables transport security for the clients. 'insecure' allows using transport security, but disables certificate verification (to be used with the autogenerated self-signed certificates). 'on' enables transport security, including server certificate verification." introductionVersion:"pre5.0"`
Expand Down
6 changes: 3 additions & 3 deletions services/webdav/pkg/config/defaults/defaultconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ func DefaultConfig() *config.Config {
Service: config.Service{
Name: "webdav",
},
OcisPublicURL: "https://127.0.0.1:9200",
WebdavNamespace: "/users/{{.Id.OpaqueId}}",
RevaGateway: shared.DefaultRevaConfig().Address,
OpenCloudPublicURL: "https://127.0.0.1:9200",
WebdavNamespace: "/users/{{.Id.OpaqueId}}",
RevaGateway: shared.DefaultRevaConfig().Address,
}
}

Expand Down
4 changes: 2 additions & 2 deletions services/webdav/pkg/service/v0/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ func (g Webdav) PublicThumbnail(w http.ResponseWriter, r *http.Request) {
Processor: tr.Processor,
Source: &thumbnailssvc.GetThumbnailRequest_WebdavSource{
WebdavSource: &thumbnailsmsg.WebdavSource{
Url: g.config.OcisPublicURL + r.URL.RequestURI(),
Url: g.config.OpenCloudPublicURL + r.URL.RequestURI(),
IsPublicLink: true,
PublicLinkToken: tr.PublicLinkToken,
},
Expand Down Expand Up @@ -437,7 +437,7 @@ func (g Webdav) PublicThumbnailHead(w http.ResponseWriter, r *http.Request) {
Processor: tr.Processor,
Source: &thumbnailssvc.GetThumbnailRequest_WebdavSource{
WebdavSource: &thumbnailsmsg.WebdavSource{
Url: g.config.OcisPublicURL + r.URL.RequestURI(),
Url: g.config.OpenCloudPublicURL + r.URL.RequestURI(),
IsPublicLink: true,
PublicLinkToken: tr.PublicLinkToken,
},
Expand Down
Loading