> For the complete documentation index, see [llms.txt](https://docs.datasaur.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.datasaur.ai/llm-projects/knowledge-base/external-object-storage.md).

# External Object Storage

## Overview

External object storage integration improves knowledge base accessibility by allowing users to connect their repositories directly. This enables straightforward data import, supporting a smoother and more efficient RAG process within the platform.

## Available providers

Right now, we support five external object storage services:

1. AWS S3.
2. Google Cloud Storage.
3. Azure Blob Storage.
4. Dropbox.
5. Google Drive.

## Connect external object storage to workspace

1. Go to **Workspace settings.**
2. Navigate to **External object storage** section, then click **Add external object storage**.

<figure><img src="/files/tFF32pqEMY4EHgzMuJD5" alt=""><figcaption><p>Add external object storage</p></figcaption></figure>

3. Choose a service and fill in the credentials.

<figure><img src="/files/aQBoUL3eUTiLM4poS4P6" alt=""><figcaption><p>List of object storage</p></figcaption></figure>

For more detailed guides on connecting to each external object storage, you can refer to this documentation:

1. [AWS S3](/integrations/external-object-storage/aws-s3.md)
2. [Google Cloud Storage](/integrations/external-object-storage/google-cloud-storage.md)
3. [Azure Blob Storage](/integrations/external-object-storage/azure-blob-storage.md)
4. [Dropbox](/integrations/external-object-storage/dropbox.md)
5. [Google Drive](/integrations/external-object-storage/google-drive.md)

## Connect external object storage to knowledge base

1. Make sure you already connect the external object storage from the workspace settings.
2. Open your knowledge base, click the more menu next to **Upload files** button and select **Connect object storage.**

   <figure><img src="/files/smLjZzVt8Y4GSCtHYTKH" alt=""><figcaption></figcaption></figure>
3. Select the object storage.

   <figure><img src="/files/elWZ87Fa8RtxpHZHP2bK" alt=""><figcaption></figcaption></figure>
4. After you click your desired external object storage, a dialog will show. By default, all supported files will be added to the knowledge base.

   <figure><img src="/files/t3gpMk6V82HqqGJbUuiQ" alt=""><figcaption></figcaption></figure>
5. You can filter the files by writing [rules](#rules-in-external-object-storage), then click **Test rules.** When the document list already matches your preference, click **Connect object storage.**

   <figure><img src="/files/TF4h2hWTCUoDQ5muHq2H" alt=""><figcaption></figcaption></figure>
6. Once the process is finished, you can view your files within your knowledge base.

   <figure><img src="/files/739XC7A6BTReSRr4pSng" alt=""><figcaption></figcaption></figure>

***

### Rules in external object storage

Rules help import specific files from external object storage into the knowledge base. Using [glob patterns](https://en.wikipedia.org/wiki/Glob_\(programming\)), you can include or exclude specific files.

<figure><img src="/files/KfzS18NDtWgLjNIaZeUa" alt=""><figcaption></figcaption></figure>

When setting up rules for importing files from your external object storage into the knowledge base, understanding how to effectively use Glob patterns is crucial. Here are some tips to guide you through the process:

#### Identify file patterns

Determine the common patterns in the names of files you wish to import or exclude. For example, if you want to import all `.pdf` files, your pattern would be `*.pdf`.

#### Utilize wildcards

* `*` (asterisk) matches zero or more characters. For instance, `*.pdf` matches all files ending in `.pdf`.
* `?` (question mark) matches exactly one character. For example, `?.pdf` matches `a.pdf` but not `ab.pdf`.

#### Specify directories

If you want to specify files in a particular directory, include the directory name in your pattern. For example, `myfolder/*.pdf` matches all `.pdf` files in the `myfolder` directory.

#### Exclude files

To exclude files, you can use the negation pattern `!`. For example, if you want to import all `.pdf` files except those starting with `temp`, your rules would include `*.pdf` and `!temp*.pdf`.

#### Combine patterns

You can combine multiple patterns to fine-tune your selection. For example, to import `.pdf` and `.docx` files but exclude those in the `drafts` folder, use `*.pdf`, `*.docs`, and `!drafts/*`.

#### Example rules

1. Import all `.pdf` files: `*.pdf`
2. Import all files except those in the `temp` directory: `*`, `!temp/*`
3. Import all `.docx` and `.txt` files in the `data` directory: `data/*.docx`, `data/*.txt`

Remember, the order of rules matters. Patterns defined later can override those defined earlier, so plan your rules accordingly to ensure the correct files are imported.
