> ## Documentation Index
> Fetch the complete documentation index at: https://docs.open-metadata.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Documents and Archive

> Upload and organize files. MCP assistants can retrieve question and answer notes extracted from uploaded files.

# Documents and Archive

Documents let you upload files, such as reports, spreadsheets, and compliance audits, without rewriting them as an Article. When OpenMetadata extracts question and answer notes from a file, MCP assistants can retrieve the extracted content. The assistant searches the extracted notes, not the Document record itself. MCP assistants reach Articles through the `find_context` tool instead. Organize files into folders to keep related documents together.

## Upload a Document

> [!NOTE]
>
> Uploaded files are saved in object storage, which an administrator must turn on. If it is off, uploads look successful but downloads fail with `No current content found for this file`. For more information, see [Configure Object Storage](https://docs.open-metadata.org/v2.1.x/deployment/object-storage.md).

1. From the left navigation bar, navigate to **Context Center** > **Documents**.

   ![Access documents](https://mintcdn.com/openmetadata/MMJo-XlZ0pAgPytd/public/images/how-to-guides/context-center/access-documents.png?fit=max\&auto=format\&n=MMJo-XlZ0pAgPytd\&q=85\&s=ff30483bf9a046762da71a48765e7439)

2. Click **Upload File**.

   ![Upload a file to Documents](https://mintcdn.com/openmetadata/z7CT1cOFBu1kZ6jZ/public/images/how-to-guides/context-center/upload-files.png?fit=max\&auto=format\&n=z7CT1cOFBu1kZ6jZ\&q=85\&s=979a49b833e92a32ef3eed37c9945295)

3. Browse to the files on your computer and upload them.

4. Optionally, organize the file into a folder:
   * Click the **+** icon next to **Folder** to create a new folder.
   * Files you don't move into a folder stay listed at the top level.

## View and Manage Documents

The **Documents** page shows:

* **Search bar**: Search documents by file name.
* **Folder panel**: Lists your folders on the left, each showing how many files it contains.
  * To create a new folder, click the ![plus icon](https://mintcdn.com/openmetadata/z7CT1cOFBu1kZ6jZ/public/images/how-to-guides/context-center/plus-icon.png?fit=max\&auto=format\&n=z7CT1cOFBu1kZ6jZ\&q=85\&s=b11aba5951c99b5578384e1c2cee1b90) icon next to **Folder**.
  * Click a folder to see only the files inside it.
* **File list**: Shows the total number of files, sorted by **Recently uploaded** by default.
* **Files Actions**:
  * **Preview**: Open the file in a preview window. See [Preview a Document](#preview-a-document).
  * **Download**: Save a copy of the file to your local system.
  * **Copy link**: Copy the document URL.
  * **Three-dot (**⋮**) menu**:

    * **Visibility**: Choose who can see the file. See [Control Who Can See a Document](#control-who-can-see-a-document).
    * **Move to Folder**: Move the file into a different folder.
    * **Delete**: Remove the file from Documents. This doesn't erase it immediately. See [Archive](#archive).

    ![Manage a document from the file row menu](https://mintcdn.com/openmetadata/z7CT1cOFBu1kZ6jZ/public/images/how-to-guides/context-center/manage-document.png?fit=max\&auto=format\&n=z7CT1cOFBu1kZ6jZ\&q=85\&s=23bae85fc473fcf6afd227deae4ca680)

## Preview a Document

You can read a file in OpenMetadata without downloading it. Preview is available from release 2.1.

1. In the file list, click the **Preview** (eye) icon on the file row. A preview window opens with the file name as its title.

   ![Preview icon on a file row in Documents](https://mintcdn.com/openmetadata/3n9ihib3Z5DMrosD/public/images/how-to-guides/context-center/document-preview-icon.png?fit=max\&auto=format\&n=3n9ihib3Z5DMrosD\&q=85\&s=2798b7d576fc7c06642ddc20f371a641)

2. Read the file, then close the window.

Preview supports the following file types:

* **Markdown**: Shown as formatted text.
* **Text and CSV**: Shown as plain text. OpenMetadata shows the first 100,000 characters and adds a note that the preview is truncated. Download the file to read the rest.
* **PDF**: Shown in the preview window. OpenMetadata shows the first 50 pages and adds a note that you can download the file to see all pages.
* **Images**: Shown in the preview window. OpenMetadata doesn't extract text from images, so an uploaded image shows the **Unsupported** status in the file list and produces no memories.

  ![An uploaded PNG with the Unsupported status in the Documents list](https://mintcdn.com/openmetadata/JtjinikCAJVo-u8K/public/images/how-to-guides/context-center/documents-unsupported-image.png?fit=max\&auto=format\&n=JtjinikCAJVo-u8K\&q=85\&s=a06e494317e2a76ee6559d2ed1451e00)

For any other file type, such as Word, Excel, or PowerPoint files, the **Preview** icon is hidden. Click **Download** to open the file in another application.

If a file is larger than 25 MB, the preview window shows **This file is too large to preview. Download it to view.** with a **Download** button.

## Control Who Can See a Document

Each document has a visibility setting. Visibility controls who can find and open the document in Documents and in search. It's available from release 2.1.

To change the setting:

1. In the file list, click the **⋮** icon on the file row.

   ![Three-dot menu on a file row in Documents](https://mintcdn.com/openmetadata/3n9ihib3Z5DMrosD/public/images/how-to-guides/context-center/document-actions-menu.png?fit=max\&auto=format\&n=3n9ihib3Z5DMrosD\&q=85\&s=6dc1f1b0bc222c7eb27e63d0c57620d2)

2. Select **Visibility**, then select one of the following options:

   * **Private**: Visible only to the owners of the document and to administrators.
   * **Workspace**: Visible to everyone in the workspace.
   * **Shared**: Visible only to the people you choose. Select the users in the list that opens. They get view access.

   ![Visibility submenu with Private, Workspace, and Shared options](https://mintcdn.com/openmetadata/3n9ihib3Z5DMrosD/public/images/how-to-guides/context-center/document-visibility.png?fit=max\&auto=format\&n=3n9ihib3Z5DMrosD\&q=85\&s=04f239b25014b0346462cfbc29b23440)

OpenMetadata shows a confirmation message when the setting is saved.

Keep the following in mind:

* Only the owner of a document or an administrator can make it **Private** or **Shared**. Other users who try this see the message **Only a document's owner can make it private or choose who it is shared with.**
* Documents that were uploaded before release 2.1 have no visibility setting. They stay visible to everyone, as before. A document is restricted only when you set it to **Private** or **Shared**.
* Users who can't see a document can't open it, and it doesn't appear in the list or in search results for them.
* The **Visibility** option appears only for users whose role allows editing documents. See [Access Control (RBAC)](https://docs.open-metadata.org/v2.1.x/how-to-guides/context-center.md#access-control-rbac).

## Upload and Manage Documents with the API

Everything you can do in **Documents** goes through the OpenMetadata REST API, so you can load many files with a script. Create a bot in **Settings** > **Bots** and use its token. The bot, or the user whose token you use, needs permission to create and delete Context Center files. If a request returns `403`, ask an administrator to add a role that allows it. Object storage must be on. For more information, see [Configure Object Storage](https://docs.open-metadata.org/v2.1.x/deployment/object-storage.md).

| Task | Request |
| - | - |
| Upload a file | `POST /v1/contextCenter/drive/files/upload` |
| Download a file | `GET /v1/contextCenter/drive/files/{id}/download` |
| Delete a file | `DELETE /v1/contextCenter/drive/files/{id}` |
| Delete, move, or download several files | `POST /v1/contextCenter/drive/files/bulk/delete`, `PUT /v1/contextCenter/drive/files/bulk/move`, `POST /v1/contextCenter/drive/files/bulk/download` |

The upload request is a multipart form. It takes these fields:

* `file`: The file to upload.
* `displayName`: Optional. The name shown in **Documents**.
* `description`: Optional. A description of the file.
* `folder`: Optional. The fully qualified name of the folder to put the file in.
* `domain`: Optional. The fully qualified name of the domain for the file.

```bash theme={null}
curl -X POST "https://<your-host>/api/v1/contextCenter/drive/files/upload" \
  -H "Authorization: Bearer $TOKEN" \
  -F "file=@report.pdf" \
  -F "displayName=Quarterly report" \
  -F "folder=<folder-fqn>"
```

To upload many files, run one request for each file.

A download from Amazon S3 or Azure Blob Storage redirects to a short-lived signed link. With curl, add `-L` to follow the redirect, or add `?redirect=false` to stream the file through OpenMetadata.

A delete moves the file to **Archive**. To remove it permanently, add `?hardDelete=true` to the delete request.

If a download fails with `No current content found for this file`, the object storage setting is the most likely cause. For more information, see [Configure Object Storage](https://docs.open-metadata.org/v2.1.x/deployment/object-storage.md#check-that-it-works).

## Archive

Deleting a document moves it to **Context Center** > **Archive** instead of erasing it right away. From Archive, you can:

* To restore the document, click the **Restore** icon next to the document.
* To remove the document permanently, click the **Delete** icon next to the document.

  ![Archive actions](https://mintcdn.com/openmetadata/MMJo-XlZ0pAgPytd/public/images/how-to-guides/context-center/archives-actions.png?fit=max\&auto=format\&n=MMJo-XlZ0pAgPytd\&q=85\&s=fc32878be90cef81691632334be59b6a)

Archive currently holds only deleted Documents. Deleted Articles and Memories aren't tracked here.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.