1MONGOC_GRIDFS_BUCKET_OPEN_UPLMOOANDMG_oOSnCTg_RoGEDRABIMD_CFWSID_TrBHiU_vCIeKDrE(T3_)OPEN_UPLOAD_STREAM_WITH_ID(3)
2
3
4
6 mongoc_gridfs_bucket_open_upload_stream_with_id - mon‐
7 goc_gridfs_bucket_open_upload_stream_with_id()
8
10 mongoc_stream_t *
11 mongoc_gridfs_bucket_open_upload_stream_with_id (mongoc_gridfs_bucket_t *bucket,
12 const bson_value_t *file_id,
13 const char *filename,
14 const bson_t *opts,
15 bson_error_t *error);
16
18 · bucket: A mongoc_gridfs_bucket_t.
19
20 · file_id: A bson_value_t specifying the id of the created file.
21
22 · filename: The name of the file to create.
23
24 · opts: A bson_t or NULL.
25
26 · error: A bson_error_t to receive any error or NULL.
27
28 opts may be NULL or a BSON document with additional command options:
29
30 · chunkSizeBytes: An int32 chunk size to use for this file. Overrides
31 the chunkSizeBytes set on bucket.
32
33 · metadata: A bson_t representing metadata to include with the file.
34
36 Opens a stream for writing to a new file in GridFS for a specified file
37 id. To have libmongoc generate an id, use mon‐
38 goc_gridfs_bucket_open_upload_stream().
39
41 mongoc_gridfs_bucket_open_upload_stream()
42
43 mongoc_gridfs_bucket_stream_error()
44
46 A mongoc_stream_t that can be written to or NULL on failure. Errors on
47 this stream can be retrieved with mongoc_gridfs_bucket_stream_error.
48 After calling mongoc_stream_close the file is completely written in
49 GridFS.
50
52 MongoDB, Inc
53
55 2017-present, MongoDB, Inc
56
57
58
59
601.14.0 MONGOFCe_bGR2I2D,FS2_0B1U9CKET_OPEN_UPLOAD_STREAM_WITH_ID(3)