incus-osd: Use chunks of 4MB on copy

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
This commit is contained in:
Stéphane Graber
2025-02-20 13:54:11 -05:00
parent 039233c706
commit dbbaae0c0d

View File

@@ -78,7 +78,7 @@ func (p *local) copyAsset(_ context.Context, name string, target string) error {
// Copy the content.
for {
_, err := io.CopyN(dst, src, 1024*1024)
_, err := io.CopyN(dst, src, 4*1024*1024)
if err != nil {
if errors.Is(err, io.EOF) {
break