Bound restore and publication verification downloads
This commit is contained in:
@@ -131,7 +131,8 @@ func executeRestoreDownloadAction(
|
||||
_, err := io.Copy(destination, bytes.NewReader(action.VerifiedContent))
|
||||
return err
|
||||
}
|
||||
return storage.DownloadTo(ctx, store, action.RemoteKey, destination)
|
||||
_, err := storage.StreamObject(ctx, store, action.RemoteKey, destination, restoreExpectedSize(action))
|
||||
return err
|
||||
})
|
||||
if err != nil {
|
||||
return fmt.Errorf("download to temp file: %w", err)
|
||||
@@ -359,8 +360,9 @@ func executeRestoreAudioAction(
|
||||
Size: action.Size,
|
||||
ETag: action.ETag,
|
||||
},
|
||||
Bucket: strings.TrimSpace(cfg.Pipeline.Storage.S3.Bucket),
|
||||
DestPath: temporaryPath,
|
||||
ExpectedSize: restoreExpectedSize(action),
|
||||
Bucket: strings.TrimSpace(cfg.Pipeline.Storage.S3.Bucket),
|
||||
DestPath: temporaryPath,
|
||||
})
|
||||
if err != nil {
|
||||
return fmt.Errorf("materialize audio: %w", err)
|
||||
|
||||
Reference in New Issue
Block a user