1MONGOC_GRIDFS_BUCKET_OPEN_UPLOAD_STRlEiMAbOMmN(oG3nO)gCo_cGRIDFS_BUCKET_OPEN_UPLOAD_STREAM(3)
2
3
4
6 mongoc_gridfs_bucket_open_upload_stream - mongoc_gridfs_bucket_open_up‐
7 load_stream()
8
10 mongoc_stream_t *
11 mongoc_gridfs_bucket_open_upload_stream (mongoc_gridfs_bucket_t *bucket,
12 const char *filename,
13 const bson_t *opts,
14 bson_value_t *file_id,
15 bson_error_t *error);
16
18 • bucket: A mongoc_gridfs_bucket_t.
19
20 • filename: The name of the file to create.
21
22 • opts: A bson_t or NULL.
23
24 • file_id: A bson_value_t to receive the generated id of the file or
25 NULL.
26
27 • error: A bson_error_t to receive any error or NULL.
28
29 opts may be NULL or a BSON document with additional command options:
30
31 • chunkSizeBytes: An int32 chunk size to use for this file. Overrides
32 the chunkSizeBytes set on bucket.
33
34 • metadata: A bson_t representing metadata to include with the file.
35
37 Opens a stream for writing to a new file in GridFS. The file id is gen‐
38 erated automatically. To specify an explicit file id, use mon‐
39 goc_gridfs_bucket_open_upload_stream_with_id().
40
42 mongoc_gridfs_bucket_open_upload_stream_with_id()
43
44 mongoc_gridfs_bucket_stream_error()
45
47 A mongoc_stream_t that can be written to or NULL on failure. Errors on
48 this stream can be retrieved with mongoc_gridfs_bucket_stream_error.
49 After calling mongoc_stream_close the file is completely written in
50 GridFS.
51
53 MongoDB, Inc
54
56 2017-present, MongoDB, Inc
57
58
59
60
611.17.6 JunM0O3N,GO2C0_2G1RIDFS_BUCKET_OPEN_UPLOAD_STREAM(3)