Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ cabal.sandbox.config
*.eventlog
.stack-work/
cabal.project.local
*~
*~
tags
tags.mtime
1 change: 1 addition & 0 deletions src/Network/Minio.hs
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ module Network.Minio
pooUserMetadata,
pooNumThreads,
pooSSE,
pooIfNoneMatch,
getObject,
GetObjectOptions,
defaultGetObjectOptions,
Expand Down
12 changes: 8 additions & 4 deletions src/Network/Minio/Data.hs
Original file line number Diff line number Diff line change
Expand Up @@ -373,12 +373,14 @@ data PutObjectOptions = PutObjectOptions
-- | Set number of worker threads used to upload an object.
pooNumThreads :: Maybe Word,
-- | Set object encryption parameters for the request.
pooSSE :: Maybe SSE
pooSSE :: Maybe SSE,
-- | Set a behavior to put object with name already existed in storage.
pooIfNoneMatch :: Maybe Text
}

-- | Provide default `PutObjectOptions`.
defaultPutObjectOptions :: PutObjectOptions
defaultPutObjectOptions = PutObjectOptions Nothing Nothing Nothing Nothing Nothing Nothing [] Nothing Nothing
defaultPutObjectOptions = PutObjectOptions Nothing Nothing Nothing Nothing Nothing Nothing [] Nothing Nothing Nothing

pooToHeaders :: PutObjectOptions -> [HT.Header]
pooToHeaders poo =
Expand All @@ -395,7 +397,8 @@ pooToHeaders poo =
"content-disposition",
"content-language",
"cache-control",
"x-amz-storage-class"
"x-amz-storage-class",
"if-none-match"
]
values =
map
Expand All @@ -405,7 +408,8 @@ pooToHeaders poo =
pooContentDisposition,
pooContentLanguage,
pooCacheControl,
pooStorageClass
pooStorageClass,
pooIfNoneMatch
]

-- |
Expand Down