Skip to content

Commit

Permalink
debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
domenkozar committed May 10, 2020
1 parent fd33f89 commit abf9442
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Network/AWS/S3/StreamingUpload.hs
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,12 @@ streamUpload mChunkSize multiPartUploadDesc =
-> (Int, ByteString)
-> m (Maybe CompletedPart)
multiUpload bucket key upId (partnum, buffer) = do
liftIO $ putStrLn $ "part " <> show partnum <> " " <> (show $ BS.length buffer)
res <- liftAWS $ send $ uploadPart bucket key partnum upId (toBody $ HashedBytes (hash buffer) buffer)
when (res ^. uprsResponseStatus /= 200) $
fail "Failed to upload piece"
logStr $ printf "\n**** Uploaded part %d" partnum
liftIO $ putStrLn $ "part " <> show partnum <> " done"
return $ completedPart partnum <$> (res ^. uprsETag)

-- collect all the parts
Expand Down

0 comments on commit abf9442

Please sign in to comment.