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 BSON_GNUC_WARN_UNUSED_RESULT;
17
19 • bucket: A mongoc_gridfs_bucket_t.
20
21 • filename: The name of the file to create.
22
23 • opts: A bson_t or NULL.
24
25 • file_id: A bson_value_t to receive the generated id of the file or
26 NULL.
27
28 • error: A bson_error_t to receive any error or NULL.
29
30 opts may be NULL or a BSON document with additional command options:
31
32 • chunkSizeBytes: An int32 chunk size to use for this file. Overrides
33 the chunkSizeBytes set on bucket.
34
35 • metadata: A bson_t representing metadata to include with the file.
36
38 Opens a stream for writing to a new file in GridFS. The file id is gen‐
39 erated automatically. To specify an explicit file id, use mon‐
40 goc_gridfs_bucket_open_upload_stream_with_id().
41
43 A mongoc_stream_t that can be written to or NULL on failure. Errors on
44 this stream can be retrieved with mongoc_gridfs_bucket_stream_error.
45 After calling mongoc_stream_close the file is completely written in
46 GridFS.
47
48 SEE ALSO:
49 mongoc_gridfs_bucket_open_upload_stream_with_id()
50
51 mongoc_gridfs_bucket_stream_error()
52
53
55 MongoDB, Inc
56
58 2017-present, MongoDB, Inc
59
60
61
62
631.21.1 MarM0O2N,GO2C0_2G2RIDFS_BUCKET_OPEN_UPLOAD_STREAM(3)