ihp-zip: Support for making ZIP archives with IHP

[ ihp, library, mit, web ] [ Propose Tags ] [ Report a vulnerability ]

Provides the renderZip / renderZipUnnamed controller helpers for streaming a Codec.Archive.Zip.Archive back to the browser as the response of an IHP action.


[Skip to Readme]

Modules

  • IHP
    • Zip
      • IHP.Zip.ControllerFunctions

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0
Dependencies base (>=4.17 && <4.22), http-types (>=0.12 && <0.13), ihp (>=1.5 && <2), wai (>=3.2 && <3.3), zip-archive (>=0.4 && <0.5) [details]
License MIT
Copyright (c) digitally induced GmbH
Author digitally induced GmbH
Maintainer hello@digitallyinduced.com
Uploaded by MarcScholten at 2026-04-09T09:39:53Z
Category Web, IHP
Home page https://ihp.digitallyinduced.com/
Bug tracker https://github.com/digitallyinduced/ihp-zip/issues
Source repo head: git clone https://github.com/digitallyinduced/ihp-zip
Downloads 0 total (0 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2026-04-09 [all 2 reports]

Readme for ihp-zip-0.1.0

[back to package description]

Support for making ZIP Archives with IHP

Install

  1. Add ihp-zip and zip-archive to the haskellDeps in your default.nix:
    let
        ...
        haskellEnv = import "${ihp}/NixSupport/default.nix" {
            ihp = ihp;
            haskellDeps = p: with p; [
                # ...
                ihp-zip
                zip-archive
            ];
        ...
    
  2. Run make -B .envrc
  3. Add IHP.Zip.ControllerFunctions to your Web.Controller.Prelude:
    module Web.Controller.Prelude
    ( module Web.Types
    , module Application.Helper.Controller
    , module IHP.ControllerPrelude
    , module Generated.Types
    , module IHP.Zip.ControllerFunctions -- <------- ADD THIS EXPORT
    )
    where
    
    import Web.Types
    import Application.Helper.Controller
    import IHP.ControllerPrelude
    import Generated.Types
    import IHP.Zip.ControllerFunctions -- <----- ADD THIS IMPORT
    

Usage

In your action use it like this:

module Web.Controller.Users where

import Web.Controller.Prelude

import qualified Codec.Archive.Zip as Zip

instance Controller UsersController where
    action ExportAction = do
        archive <- ["FileA", "FileB"]
                |> Zip.addFilesToArchive [] Zip.emptyArchive

        renderZip "Export.zip" archive