File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -115,15 +115,18 @@ storeFileWithOptions fileInfo options = do
115
115
116
116
let contentType = cs (Wai. fileContentType fileInfo)
117
117
contentDisposition <- (get # contentDisposition options) fileInfo
118
- runMinio connectInfo do
118
+ trySaveFile <- runMinio connectInfo do
119
119
let options :: PutObjectOptions = defaultPutObjectOptions { pooContentType = Just contentType, pooContentDisposition = contentDisposition }
120
120
putObject bucket objectPath payload Nothing options
121
+ case trySaveFile of
122
+ Left e -> throw e
123
+ Right _ -> pure ()
121
124
122
125
pure $ baseUrl <> objectPath
123
126
124
127
pure StoredFile { path = objectPath, url }
125
128
126
- -- | Fetchs an url and uploads it to the storage.
129
+ -- | Fetches an url and uploads it to the storage.
127
130
--
128
131
-- The stored file has the content type provided by @Content-Type@ header of the downloaded file.
129
132
--
You can’t perform that action at this time.
0 commit comments