Skip to content

Commit

Permalink
Merge branch 'master' of github.com:digitallyinduced/ihp
Browse files Browse the repository at this point in the history
  • Loading branch information
mpscholten committed Jul 21, 2024
2 parents e0d7ce0 + a58f7a0 commit c4b8993
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/keep_releases_in_cachix.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Keep Releases in Cachix
on:
push:
branches: master
schedule:
- cron: '0 17 * * *'
jobs:
Expand Down
3 changes: 3 additions & 0 deletions Guide/file-storage.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -869,6 +869,7 @@ import Web.Controller.Prelude
import IHP.ControllerSupport
import System.Directory (doesFileExist)
import qualified Data.Text as Text
import qualified Data.UUID as UUID (fromText)

instance Controller ImageStyleController where
action RenderImageStyleAction { width, height, originalImagePath } = do
Expand All @@ -891,6 +892,8 @@ instance Controller ImageStyleController where
let options :: StoreFileOptions = def
{ directory = imageStylePathDirectory
, preprocess = applyImageMagick "jpg" ["-resize", cs size <> "^", "-gravity", "center", "-extent", cs size, "-quality", "85%", "-strip"]
-- Keep the original filename.
, fileName = UUID.fromText uuid
}

storedFile <- storeFileFromPath (cs $ storagePrefix <> originalImageDirectory <> "/" <> uuid) options
Expand Down
2 changes: 1 addition & 1 deletion lib/IHP/static/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ window.submitForm = function (form, possibleClickedButton) {
// of full urls like `http://example.com/Projects`
var url = new URL(formAction, document.baseURI);
for (var pair of formData.entries()) {
url.searchParams.set(pair[0], pair[1]);
url.searchParams.append(pair[0], pair[1]);
}

request.open(formMethod, url.toString(), true);
Expand Down

0 comments on commit c4b8993

Please sign in to comment.