mirror of
https://github.com/commercialhaskell/stackage-server.git
synced 2026-02-04 15:20:25 +01:00
Try to avoid chunkedFile #275
This commit is contained in:
parent
dfe0122edf
commit
2701f186ca
@ -653,7 +653,8 @@ uploadHoogleDB fp key =
|
|||||||
withTempFile (takeDirectory fp) (takeFileName fp <.> "gz") $ \fpgz h -> do
|
withTempFile (takeDirectory fp) (takeFileName fp <.> "gz") $ \fpgz h -> do
|
||||||
runConduitRes $ sourceFile fp .| compress 9 (WindowBits 31) .| CB.sinkHandle h
|
runConduitRes $ sourceFile fp .| compress 9 (WindowBits 31) .| CB.sinkHandle h
|
||||||
hClose h
|
hClose h
|
||||||
body <- chunkedFile defaultChunkSize fpgz
|
-- FIXME body <- chunkedFile defaultChunkSize fpgz
|
||||||
|
body <- toBody <$> readFileBinary fpgz
|
||||||
uploadBucket <- scUploadBucketName <$> ask
|
uploadBucket <- scUploadBucketName <$> ask
|
||||||
uploadFromRIO key $
|
uploadFromRIO key $
|
||||||
set poACL (Just OPublicRead) $ putObject (BucketName uploadBucket) key body
|
set poACL (Just OPublicRead) $ putObject (BucketName uploadBucket) key body
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user