1MONGOC_GRIDFS_BUCKET_UPLOAD_FMROONMG_OSCT_RlGEiRAbIMmD_oFWnSIg_ToBHcU_CIKDE(T3_)UPLOAD_FROM_STREAM_WITH_ID(3)
2
3
4

NAME

6       mongoc_gridfs_bucket_upload_from_stream_with_id          -         mon‐
7       goc_gridfs_bucket_upload_from_stream_with_id()
8

SYNOPSIS

10          bool
11          mongoc_gridfs_bucket_upload_from_stream_with_id (mongoc_gridfs_bucket_t *bucket,
12                                                           const bson_value_t *file_id,
13                                                           const char *filename,
14                                                           mongoc_stream_t *source,
15                                                           const bson_t *opts,
16                                                           bson_error_t *error);
17

PARAMETERS

19       · bucket: A mongoc_gridfs_bucket_t.
20
21       · file_id: A bson_value_t specifying the id of the created file.
22
23       · filename: The name of the file to create.
24
25       · source: A mongoc_stream_t used as the source of the data to upload.
26
27       · opts: A bson_t or NULL.
28
29       · error: A bson_error_t to receive any error or NULL.
30
31       opts may be NULL or a BSON document with additional command options:
32
33       · chunkSizeBytes: An int32 chunk size to use for this  file.  Overrides
34         the chunkSizeBytes set on bucket.
35
36       · metadata: A bson_t representing metadata to include with the file.
37

DESCRIPTION

39       Reads  from  the  source stream and writes to a new file in GridFS.  To
40       have      libmongoc      generate      an      id,       use       mon‐
41       goc_gridfs_bucket_upload_from_stream().
42
43       Reads  from  the  source  stream  using  mongoc_stream_read() until the
44       return value indicates end-of-file.  The source stream  is  not  closed
45       after   calling  mongoc_gridfs_bucket_upload_from_stream();  call  mon‐
46       goc_stream_close() after.
47

SEE ALSO

49       mongoc_stream_file_new and mongoc_stream_file_new_for_path,  which  can
50       be used to create a source stream from a file.
51

RETURNS

53       True if the operation succeeded. False otherwise and sets error.
54

AUTHOR

56       MongoDB, Inc
57
59       2017-present, MongoDB, Inc
60
61
62
63
641.16.2                      MONGOFCe_bGR2I5D,FS2_0B2U0CKET_UPLOAD_FROM_STREAM_WITH_ID(3)
Impressum