diff --git a/go_cloud/api b/go_cloud/api index 9ef8331..465f8fc 100755 Binary files a/go_cloud/api and b/go_cloud/api differ diff --git a/go_cloud/internal/storage/nextcloud.go b/go_cloud/internal/storage/nextcloud.go index 831d704..6ca3ea5 100644 --- a/go_cloud/internal/storage/nextcloud.go +++ b/go_cloud/internal/storage/nextcloud.go @@ -65,10 +65,13 @@ func GenerateSecurePassword(length int) (string, error) { // NewUserWebDAVClient creates a WebDAV client for a specific user func NewUserWebDAVClient(nextcloudBaseURL, username, password string) *WebDAVClient { - baseURL := fmt.Sprintf("%s/remote.php/dav/files/%s", nextcloudBaseURL, username) + // Remove any path from base URL, we need just the scheme://host:port + baseURL := strings.Split(nextcloudBaseURL, "/remote.php")[0] + // Build the full WebDAV URL for this user + fullURL := fmt.Sprintf("%s/remote.php/dav/files/%s", baseURL, username) return &WebDAVClient{ - baseURL: baseURL, + baseURL: fullURL, user: username, pass: password, basePrefix: "/",