Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
c852b8e0
Unverified
Commit
c852b8e0
authored
Feb 04, 2025
by
Jeffrey Morgan
Committed by
GitHub
Feb 04, 2025
Browse files
server: always print upload/download part info (#8832)
parent
d8932c55
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
server/download.go
server/download.go
+4
-1
server/upload.go
server/upload.go
+3
-1
No files found.
server/download.go
View file @
c852b8e0
...
...
@@ -170,9 +170,12 @@ func (b *blobDownload) Prepare(ctx context.Context, requestURL *url.URL, opts *r
offset
+=
size
}
}
else
{
}
if
len
(
b
.
Parts
)
>
0
{
slog
.
Info
(
fmt
.
Sprintf
(
"downloading %s in %d %s part(s)"
,
b
.
Digest
[
7
:
19
],
len
(
b
.
Parts
),
format
.
HumanBytes
(
b
.
Parts
[
0
]
.
Size
)))
}
return
nil
}
...
...
server/upload.go
View file @
c852b8e0
...
...
@@ -108,7 +108,9 @@ func (b *blobUpload) Prepare(ctx context.Context, requestURL *url.URL, opts *reg
offset
+=
size
}
slog
.
Info
(
fmt
.
Sprintf
(
"uploading %s in %d %s part(s)"
,
b
.
Digest
[
7
:
19
],
len
(
b
.
Parts
),
format
.
HumanBytes
(
b
.
Parts
[
0
]
.
Size
)))
if
len
(
b
.
Parts
)
>
0
{
slog
.
Info
(
fmt
.
Sprintf
(
"uploading %s in %d %s part(s)"
,
b
.
Digest
[
7
:
19
],
len
(
b
.
Parts
),
format
.
HumanBytes
(
b
.
Parts
[
0
]
.
Size
)))
}
requestURL
,
err
=
url
.
Parse
(
location
)
if
err
!=
nil
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment