Local zip generation for S3-compatible storage services that lack cloud-side zip capabilities.
This module downloads multiple files referenced by a zip index (produced
by ExOss.Storage.mkzip_index_content/1), zips them in memory using
:zip.zip/3, and returns the binary content. The resulting zip can then
be uploaded to the storage backend via a ExOss.StorageTask.
Summary
Functions
Downloads all files referenced in the index and returns the zip binary.
Types
Functions
Downloads all files referenced in the index and returns the zip binary.
The index_path is the raw text returned by ExOss.Storage.mkzip_index_content/1.
Each line encodes a URL and an alias name, both Base64 url-safe encoded:
/url/{base64(url)}/alias/{base64(alias_name)}Examples
index = ExOss.Storage.mkzip_index_content([
%{access_address: "https://s3.example.com/img1.jpg", alias_name: "img1.jpg"}
])
{:ok, zip_binary} = ExOss.LocalZipper.zip(index)Returns {:ok, binary} on success, or {:error, :gen_file_error} on failure.