mirror of https://github.com/databricks/cli.git
parent
da4b58a897
commit
65b3f998ba
|
@ -7,6 +7,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"net/url"
|
||||||
"path"
|
"path"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
@ -53,7 +54,7 @@ func (w *WorkspaceFilesClient) Write(ctx context.Context, name string, reader io
|
||||||
overwrite := slices.Contains(mode, OverwriteIfExists)
|
overwrite := slices.Contains(mode, OverwriteIfExists)
|
||||||
urlPath := fmt.Sprintf(
|
urlPath := fmt.Sprintf(
|
||||||
"/api/2.0/workspace-files/import-file/%s?overwrite=%t",
|
"/api/2.0/workspace-files/import-file/%s?overwrite=%t",
|
||||||
strings.TrimLeft(absPath, "/"),
|
url.QueryEscape(strings.TrimLeft(absPath, "/")),
|
||||||
overwrite,
|
overwrite,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue