---
name: "mongoc_gridfs_file_save"
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_save"
---

# mongoc\_gridfs\_file\_save(3)

## SYNOPSIS

```
bool
mongoc_gridfs_file_save (mongoc_gridfs_file_t *file);
```

## PARAMETERS

- •

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

## DESCRIPTION

Saves modifications to **file** to the MongoDB server.

If an error occurred, false is returned and the error can be retrieved with *mongoc\_gridfs\_file\_error()*.

Modifying GridFS files is NOT thread-safe. Only one thread or process can access a GridFS file while it is being modified.

## RETURNS

Returns true if successful, otherwise false.

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
