diff --git a/providers/asrockrack/firmware.go b/providers/asrockrack/firmware.go index c367b98e..6b23e72f 100644 --- a/providers/asrockrack/firmware.go +++ b/providers/asrockrack/firmware.go @@ -109,6 +109,11 @@ func (a *ASRockRack) firmwareInstallBMC(ctx context.Context, reader io.Reader, f mybytes, err = io.ReadAll(reader) fmt.Printf("ReadAll reader before uploadFW len:%d\n", len(mybytes)) + if file, ok := reader.(*os.File); ok { + fmt.Printf("Seek before upload\n") + file.Seek(0, 0) + } + a.log.V(2).WithValues("step", "2/4").Info("upload BMC firmware image to " + fwEndpoint) err = a.uploadFirmware(ctx, fwEndpoint, reader, fileSize) if err != nil {