# Documents

> In Safecube, documents are attached to a shipment and managed from the Documents block of its details page, where Editors upload and categorize them, Admins delete them and every role previews, downloads and shares them.

Each document in Safecube belongs to one shipment. The documents of a shipment are listed in the **Documents** block of its details page, between the containers and the alerts.

## Who can work with documents

| Gesture | Minimum role |
| ------- | ------------ |
| Preview, download and share a document | Viewer |
| Upload, replace, rename and categorize a document | Editor |
| Delete a document | Admin |

A document is visible to every member who sees its shipment. A member with the scope **Teams** sees only the documents of the shipments of their teams, as described in [Users and roles](/en/platform/workspace/users-and-roles).

## Find the documents of a shipment

- In the shipment details, the **Documents** block shows the number of documents and lists the first three with their **File name**, **Category**, **Added by** and **Upload date**. **Show more** lists the others, **Hide** folds them back.
- In the shipment list, a paperclip with a number shows next to the shipment number when the shipment has documents, with the tooltip "N attached document(s)". Select it to open the shipment details.

A shipment with no document reads "No documents yet".

![Documents block of a shipment with three documents, their category, author and upload date, and the Show more button](https://docs.safecube.ai/media/images/shared/shipment-details--documents.webp?v=caf5189b)

## Upload a document

1. Open the shipment details.
2. In the **Documents** block, select **Upload**, or **Upload document** when the shipment has no document.
3. Choose one file.

Safecube displays "Documents created successfully.". Any file type is accepted, up to 40 MB; a larger file reads "Oops! This file is too large. Maximum allowed size is 40 Mo.". No category is asked at upload.

## Set the category of a document

The categories are **Others**, **Customs**, **Invoices** and **Compliance**.

1. Select the **Category** cell of the document, "Edit category".
2. Choose a category. It is saved at once, with "Document updated successfully.".

## Preview, download or share a document

- **Document details**, the eye icon, opens the **Document viewer**: a preview of PDF, image, text, HTML and video files, and the **Comments** of the document. Write in **Comment**, then select **Add comment**.
- **Download document** downloads the file.
- **Share document**, in the viewer, creates a link to the file. Select **Copy link** to copy it. An Editor also finds **Share document** in **More options** on the row of the document.

## Edit, replace or delete a document

1. Open **More options** on the row of the document.
2. Select **Edit document** to change its **Name** and **Category**, then **Edit document**; or select **Delete document**, then **Delete**. Deleting a document cannot be undone.

![Edit document dialog with the Name and Category fields](https://docs.safecube.ai/media/images/shared/modal-document-edit--default.webp?v=dff24a22)

To replace the file and keep the document, open it in the **Document viewer**, then **More options**, **Replace document**.

## Limits

- One file at a time, from the file picker: there is no drag and drop on the shipment page.
- The block has no search and no category filter.
- No recipient, message or expiry date can be set on a document link.
