---
name: "mongoc_gridfs_file_set_metadata"
section: "3"
platform: "linux"
package: "libmongoc-doc"
version: "1.30.4-1+deb13u3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/mongoc_gridfs_file_set_metadata"
---

# mongoc\_gridfs\_file\_set\_metadata(3)

## SYNOPSIS

```
void
mongoc_gridfs_file_set_metadata (mongoc_gridfs_file_t *file,
                                 const bson_t *metadata);
```

## PARAMETERS

- •

  **file**: A *mongoc\_gridfs\_file\_t*.

- •

  **bson**: A *bson\_t* containing metadata for **file**.

## DESCRIPTION

Sets the metadata associated with **file**.

You need to call *mongoc\_gridfs\_file\_save()* to persist this change.

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
