Copyright | (c) digitally induced GmbH 2021 |
---|---|
Safe Haskell | None |
Synopsis
- initS3Storage :: HasCallStack => Text -> Text -> StateT TMap IO ()
- initStaticDirStorage :: StateT TMap IO ()
- initMinioStorage :: HasCallStack => Text -> Text -> StateT TMap IO ()
- initFilebaseStorage :: HasCallStack => Text -> StateT TMap IO ()
Documentation
initS3Storage :: HasCallStack => Text -> Text -> StateT TMap IO () Source #
The AWS access key and secret key have to be provided using the AWS_ACCESS_KEY_ID
and AWS_SECRET_ACCESS_KEY
env vars.
Example: Set up a s3 storage in Config.hs
module Config where import IHP.Prelude import IHP.Environment import IHP.FrameworkConfig import IHP.FileStorage.Config config :: ConfigBuilder config = do option Development option (AppHostname "localhost") initS3Storage "eu-central-1" "my-bucket-name"
initStaticDirStorage :: StateT TMap IO () Source #
Stores files publicly visible inside the static
directory
Example: Store uploaded files in the static/
directory
module Config where import IHP.Prelude import IHP.Environment import IHP.FrameworkConfig import IHP.FileStorage.Config config :: ConfigBuilder config = do option Development option (AppHostname "localhost") initStaticDirStorage
initMinioStorage :: HasCallStack => Text -> Text -> StateT TMap IO () Source #
The Minio access key and secret key have to be provided using the MINIO_ACCESS_KEY
and MINIO_SECRET_KEY
env vars.
Example: Set up a minio storage in Config.hs
module Config where import IHP.Prelude import IHP.Environment import IHP.FrameworkConfig import IHP.FileStorage.Config config :: ConfigBuilder config = do option Development option (AppHostname "localhost") initMinioStorage "https://minio.example.com" "my-bucket-name"
initFilebaseStorage :: HasCallStack => Text -> StateT TMap IO () Source #
The Filebase access key and secret key have to be provided using the FILEBASE_KEY
and FILEBASE_SECRET
env vars.
Example: Set up a Filebase storage in Config.hs
module Config where import IHP.Prelude import IHP.Environment import IHP.FrameworkConfig import IHP.FileStorage.Config config :: ConfigBuilder config = do option Development option (AppHostname "localhost") initFilebaseStorage "my-bucket-name"