Add config vars for space path templates

This commit is contained in:
André Duffeck
2024-04-23 08:37:53 +02:00
parent 4517c5ee19
commit 8cd39754c7
3 changed files with 34 additions and 18 deletions

View File

@@ -116,7 +116,9 @@ func DefaultConfig() *config.Config {
ConcurrentStreamParts: true,
NumThreads: 4,
PersonalSpaceAliasTemplate: "{{.SpaceType}}/{{.User.Username | lower}}",
PersonalSpacePathTemplate: "",
GeneralSpaceAliasTemplate: "{{.SpaceType}}/{{.SpaceName | replace \" \" \"-\" | lower}}",
GeneralSpacePathTemplate: "",
PermissionsEndpoint: "com.owncloud.api.settings",
MaxAcquireLockCycles: 20,
MaxConcurrency: 5,
@@ -130,7 +132,9 @@ func DefaultConfig() *config.Config {
ShareFolder: "/Shares",
UserLayout: "{{.Id.OpaqueId}}",
PersonalSpaceAliasTemplate: "{{.SpaceType}}/{{.User.Username | lower}}",
PersonalSpacePathTemplate: "",
GeneralSpaceAliasTemplate: "{{.SpaceType}}/{{.SpaceName | replace \" \" \"-\" | lower}}",
GeneralSpacePathTemplate: "",
PermissionsEndpoint: "com.owncloud.api.settings",
MaxAcquireLockCycles: 20,
MaxConcurrency: 5,
@@ -138,9 +142,9 @@ func DefaultConfig() *config.Config {
AsyncUploads: true,
},
Posix: config.PosixDriver{
UserLayout: "users/{{.User.Username}}",
ProjectLayout: "projects/{{.SpaceId}}",
PermissionsEndpoint: "com.owncloud.api.settings",
PersonalSpacePathTemplate: "users/{{.User.Username}}",
GeneralSpacePathTemplate: "projects/{{.SpaceId}}",
PermissionsEndpoint: "com.owncloud.api.settings",
},
},
Events: config.Events{