---
name: "mongoc_gridfs_file_set_filename"
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_filename"
---

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

## SYNOPSIS

```
void
mongoc_gridfs_file_set_filename (mongoc_gridfs_file_t *file,
                                 const char *filename);
```

## PARAMETERS

- •

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

- •

  **str**: A UTF-8 encoded string containing the filename.

## DESCRIPTION

Sets the filename for **file**.

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

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
