Path escape file path in filer interface (#254)

This commit is contained in:
shreyas-goenka 2023-03-17 17:42:35 +01:00 committed by GitHub
parent ad666ff796
commit ae09eb02d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,7 @@ func (w *WorkspaceFilesClient) Write(ctx context.Context, name string, reader io
overwrite := slices.Contains(mode, OverwriteIfExists)
urlPath := fmt.Sprintf(
"/api/2.0/workspace-files/import-file/%s?overwrite=%t",
url.QueryEscape(strings.TrimLeft(absPath, "/")),
url.PathEscape(strings.TrimLeft(absPath, "/")),
overwrite,
)