From 5c3786f4d50ce4610b3629b8f2bf2fb28a7070b6 Mon Sep 17 00:00:00 2001 From: Josh Yan Date: Tue, 23 Jul 2024 13:46:34 -0700 Subject: [PATCH] comments --- cmd/cmd.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/cmd/cmd.go b/cmd/cmd.go index ca5d7b7be..29ab82a49 100644 --- a/cmd/cmd.go +++ b/cmd/cmd.go @@ -282,12 +282,11 @@ func createBlob(cmd *cobra.Command, path string) (string, error) { digest := fmt.Sprintf("sha256:%x", hash.Sum(nil)) - // We check if we can find the models directory locally - // If we can, we return the path to the directory - // If we can't, we return an error - // If the blob exists already, we return the digest + // Use our new CreateBlob request which will include the file path + // The server checks for that file and if the server is local, it will copy the file over + // If the local copy fails, the server will continue to the default local copy + // If that fails, it will continue with the server POST err = CreateBlob(cmd.Context(), path, digest) - if errors.Is(err, ErrBlobExists) { return digest, nil }