diff --git a/Data/BlobStore.hs b/Data/BlobStore.hs index a3c440c..2a6f71c 100644 --- a/Data/BlobStore.hs +++ b/Data/BlobStore.hs @@ -130,6 +130,9 @@ cachedS3Store cache creds bucket prefix manager = $ requestBodySource len $ sourceHandle inH) void $ Aws.readResponseIO res + liftIO $ IO.withFile fp IO.ReadMode $ \inH -> withAcquire + (storeWrite' (fileStore cache) key) + (sourceHandle inH $$) else storeWrite' (fileStore cache) key , storeRead' = \key -> if shouldBackup key