mirror of
https://github.com/commercialhaskell/stackage-server.git
synced 2026-01-12 04:08:29 +01:00
Merge pull request #204 from fpco/put-snapshot-mimetype
set Content Type of the snapshot.json file to 'application/json'
This commit is contained in:
commit
81df4e9b35
@ -23,7 +23,7 @@ import Network.AWS (Credentials (Discover),
|
||||
import Control.Monad.Trans.AWS (trying, _Error)
|
||||
import Network.AWS.Data.Body (toBody)
|
||||
import Network.AWS.S3 (ObjectCannedACL (OPublicRead),
|
||||
poACL, putObject,
|
||||
poACL, poContentType, putObject,
|
||||
BucketName(BucketName),
|
||||
ObjectKey(ObjectKey))
|
||||
import Control.Lens (set, view)
|
||||
@ -182,6 +182,7 @@ stackageServerCron = do
|
||||
let key = ObjectKey "snapshots.json"
|
||||
po =
|
||||
set poACL (Just OPublicRead)
|
||||
$ set poContentType (Just "application/json")
|
||||
$ putObject (BucketName "haddock.stackage.org") key (toBody snapshots)
|
||||
putStrLn $ "Uploading: " ++ tshow key
|
||||
eres <- runResourceT $ runAWS env $ trying _Error $ send po
|
||||
|
||||
Loading…
Reference in New Issue
Block a user