Skip to content

Commit

Permalink
add a comment to prevent copy into memory
Browse files Browse the repository at this point in the history
  • Loading branch information
Emyrk committed Dec 13, 2024
1 parent dd76177 commit adb3c66
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions storage/artifactory.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,8 @@ func (s *Artifactory) Open(ctx context.Context, fp string) (fs.File, error) {
}
}

// TODO: Do no copy the bytes into memory, stream them rather than
// storing the entire file into memory.
f := mem.NewFileHandle(mem.CreateFile(fp))
_, err = io.Copy(f, resp)
if err != nil {
Expand Down

0 comments on commit adb3c66

Please sign in to comment.