- MongoDB C Driver 1.13.1 »
- API Reference »
- mongoc_gridfs_file_t

# mongoc_gridfs_file_set_content_type()

## Synopsis

    void
    mongoc_gridfs_file_set_content_type (mongoc_gridfs_file_t *file,
                                         const char *content_type);

## Parameters

- `file`: A mongoc_gridfs_file_t.
- `str`: A string containing the content type.

## Description

Sets the content type for the gridfs file. This should be something like `"text/plain"`.

You need to call mongoc_gridfs_file_save() to persist this change.

Created using Sphinx 1.8.3, based on Sphinx Readable Theme.