# Export as zip

> Package a document and all of its uploaded attachments into a self-contained zip archive with relative links.

Source: https://hyperclaylocal.com/docs/export/

You can export any document in a folder as a self-contained `.zip` archive that includes the document and its uploaded attachments, with all `/_/uploads/` links rewritten to relative `uploads/…` paths so the copy opens anywhere with its files intact.

## Export a document

1. Open the Hyperclay Local popover and click the `⋯` menu on the folder card that holds your document.
2. Click **Export a File as Zip…**.
3. In the **Export a File as Zip** dialog, pick an `.html`, `.htm`, or `.htmlclay` file inside that folder. If you select a file outside that folder, the app shows **Choose a file inside this folder.**
4. In the **Save Zip** dialog, choose where to save the archive. The filename defaults to `<name>.zip` in your `Downloads` folder.

When the export finishes, Hyperclay Local reveals the `.zip` file in Finder or your file manager. If reading or writing fails, an error dialog shows **Couldn't export `<file>`.**

## What the zip archive contains

The exported `.zip` file has a single top-level folder named after your document (`<name>/`) containing:

- **The document**: Your `.html`, `.htm`, or `.htmlclay` file with any `/_/uploads/` URLs rewritten to relative `uploads/…` paths.
- **Uploaded attachments**: The document's `uploads/assets-<name>/` folder and any other files in `uploads/` linked by the document through `/_/uploads/`, placed under `uploads/…` inside the archive.

## Safety and exclusions

- **Hidden files and symlinks excluded**: Any file or folder whose name starts with `.` and any symbolic link (including a symlinked attachments folder) are left out of the archive.
- **Atomic write**: Each export writes to its own temporary `.part` file first and replaces an existing `.zip` file only after the new archive is complete. If an export fails, the temporary file is removed and any previous `.zip` at that path is left intact.
