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

# Object storage prefix

> Collect objects under a bucket prefix and pair metadata files with the media they describe.

Sources

beta

v1.1.0

Needs S3-compatible storage and credentials

[View plugin source](https://github.com/The-Vibe-Company/quivr/tree/main/plugins/object-storage-prefix) · Plugin ID `connector.object_storage_prefix` · Plugin API `>=0.26.0 <0.27.0`

The prefix plugin brings files from a bucket into Quivr so it can read and index them.

![The prefix plugin brings files under a bucket prefix into Quivr to be read and indexed.](https://mintcdn.com/thevibecompany/R_BoVln_OJmoIk9D/images/diagrams/plugin-object-storage-prefix.png?fit=max\&auto=format\&n=R_BoVln_OJmoIk9D\&q=85\&s=6adaea72a1a0a42bb419c71fc1e094c7)

## What it does

Collect individual files under a prefix in an S3-compatible bucket. The plugin can also join a photo with a separate metadata document that describes it.

## Before you start

* Have a bucket, its signing region and a prefix (the start of an object key, such as `feed/`).
* Deposit an instance credential with `access_key_id` and `secret_access_key`. Include `session_token` for temporary credentials. Give it permission to list the prefix and read its objects. The plugin does not read ambient AWS credentials.
* Choose a collection (a Corpus in the API) and make sure Quivr can read the file formats you want to collect. Use an API key with `connectors:read`, `connectors:write`, `content:read` and `search:query` for the collection.
* Set `credential_key` in your Quivr deployment so it can store the storage credential.

Only this source plugin uses the storage credential to read the bucket. Plugins that read file formats receive temporary Quivr-signed links to the verified files.

## Enable it

**1. Find the prefix source**

Look for `object_storage_prefix` in `GET /v0/connector-kinds`. If it is missing, [pin the plugin](https://docs.quivr.thevibecompany.co/operate/manage-plugins.md#pin-a-plugin).

**2. Create an instance**

Follow [Collect from a source](https://docs.quivr.thevibecompany.co/guides/connect-a-source.md#create-an-instance) with kind `object_storage_prefix`. Set `bucket`, `prefix` and `region` in `config`. For an S3-compatible provider, set `endpoint` to its storage origin. Include the storage credential in `credential.secret` in the same request.

## Use it

### Collect files as they arrive

Set `object_patterns` to match the keys you want, such as `["feed/**/*.jpg", "feed/**/*.xml"]` for photos and XML. Keep the default `key` checkpoint mode for large imports or when new keys always sort after old keys. Use `timestamp` to pick up overwrites and new files that sort earlier. It scans the prefix to order objects by modification time.

### Pair a photo with its caption

A sidecar pair joins a media file with a separate document that describes it. For example, a NewsML-G2 XML document can supply a caption and name its JPEG under the same bucket prefix in a `remoteContent` link.

1. In `sidecars.patterns`, match the XML documents. In `sidecars.media_patterns`, match the JPEGs they may attach. Both files must pass the source's object filters.
2. Set `sidecars.reference_pattern` to capture the JPEG reference from the XML. Use the same `record_key_pattern` capture for both names and map `.xml` to `application/vnd.iptc.g2.newsitem+xml` in `media_type_by_extension`.
3. Use [the working layout and configuration](https://docs.quivr.thevibecompany.co/guides/connect-a-source.md#configure-the-connector) and enable the [NewsML-G2](https://docs.quivr.thevibecompany.co/plugins/newsml-g2.md) and [image metadata](https://docs.quivr.thevibecompany.co/plugins/image-metadata.md) plugins. If the XML can arrive first, set `sidecars.wait_seconds` to cover the upload gap. For an import where every photo has a sidecar, set `sidecars.ingest_lone_media` to `false`.

Search for a word in the caption and open the result to check that it has the image.

## Settings

## What it produces

Files become records. When a pair is found, the document supplies the description and the image appears on the same record. The pair uses the media file's record key and takes precedence over a version containing only the image.

## Limits and troubleshooting

| Symptom | What to check |
| - | - |
| A new object was missed | In `key` mode, check whether its key sorts after the last key read. Use `timestamp` for future out-of-order arrivals. |
| A link did not attach its image | Check the bucket, prefix and patterns. An allowed link resolves to an object in the configured bucket. The plugin reads that object through S3. |
| The document arrived alone | Check `pairs_done`, `documents_waiting` and `documents_alone` in the run diagnostics. With the default zero wait or after the wait expires, the document can be stored alone and later arrival of the photo does not complete that pair. |

## Related plugins

* [Object storage archive](https://docs.quivr.thevibecompany.co/plugins/object-storage-archive.md) for packaged files.
* [NewsML-G2](https://docs.quivr.thevibecompany.co/plugins/newsml-g2.md) for the caption and other descriptive fields.
* [Image metadata](https://docs.quivr.thevibecompany.co/plugins/image-metadata.md) for image dimensions and thumbnails.


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