Skip to content

Commit

Permalink
Save only the relative path of the filename for StaticDirStorage
Browse files Browse the repository at this point in the history
fixes #1989
  • Loading branch information
amitaibu authored Jul 13, 2024
1 parent 4526f58 commit f68f5b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions IHP/FileStorage/ControllerFunctions.hs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ storeFileWithOptions fileInfo options = do
|> LBS.writeFile (cs destPath)

let frameworkConfig = ?context.frameworkConfig
pure $ frameworkConfig.baseUrl <> "/" <> objectPath
pure $ "/" <> objectPath
S3Storage { connectInfo, bucket, baseUrl } -> do
let payload = fileInfo
|> (.fileContent)
Expand Down Expand Up @@ -409,4 +409,4 @@ storage = ?context.frameworkConfig.appConfig
storagePrefix :: (?context :: ControllerContext) => Text
storagePrefix = case storage of
StaticDirStorage -> "static/"
_ -> ""
_ -> ""

0 comments on commit f68f5b6

Please sign in to comment.