Eazip
Concepts

Inputs and sources

Understand accepted file shapes, ZIP entry names, and how Local and Cloud fetch remote URLs.

The files option accepts browser files and remote URLs without requiring you to normalize them first.

Which input shapes can I use?

ShapeExampleUse it for
FileListinput.filesA browser file picker
File or BlobselectedFileOne browser-owned file
URL string'https://example.com/report.pdf'A remote file with an inferred name
Source object{ url, filename } or { file, filename }A custom path inside the ZIP

Pass one item directly or mix multiple items in an array:

const result = await createZip({
  files: [
    selectedFile,
    'https://cdn.example.com/report.pdf',
    {
      url: 'https://cdn.example.com/data.csv',
      filename: 'exports/data.csv',
    },
  ],
  zipName: 'bundle.zip',
});

An empty or unsupported input fails before a job starts.

How is the ZIP entry name chosen?

Eazip uses the first available name in this order:

  1. the explicit filename on a source object;
  2. a file's webkitRelativePath, preserving a selected directory structure;
  3. the file's name;
  4. the last path segment of a URL;
  5. a generated file-N fallback.

Paths are sanitized so they cannot escape the archive root. Duplicate names receive (2), (3), and later suffixes before the extension.

Who fetches a remote URL?

LocalCloud
Fetches the URLThe user's browserEazip Cloud
CORS requiredYesNo
Browser cookies sentNoNot applicable
Accepted sourcesFiles, blobs, and URLsURLs only

For Local jobs, the source must allow an anonymous browser request. A custom fetch can add headers or route the request through infrastructure you control.

For Cloud jobs, CORS no longer applies, but the source must be reachable by Eazip Cloud and allowed by the Public App configuration. A host that works in a browser can still reject server-side requests.

Next steps