diff --git a/.github/workflows/keep_releases_in_cachix.yml b/.github/workflows/keep_releases_in_cachix.yml index e88df8300..162db16a9 100644 --- a/.github/workflows/keep_releases_in_cachix.yml +++ b/.github/workflows/keep_releases_in_cachix.yml @@ -1,5 +1,7 @@ name: Keep Releases in Cachix on: + push: + branches: master schedule: - cron: '0 17 * * *' jobs: diff --git a/Guide/file-storage.markdown b/Guide/file-storage.markdown index 844658404..e3b66a48a 100644 --- a/Guide/file-storage.markdown +++ b/Guide/file-storage.markdown @@ -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 @@ -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 diff --git a/lib/IHP/static/helpers.js b/lib/IHP/static/helpers.js index 248b0447d..66fb2a97e 100644 --- a/lib/IHP/static/helpers.js +++ b/lib/IHP/static/helpers.js @@ -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);