We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d1c12e1 commit 044401bCopy full SHA for 044401b
src/gridfs.rs
@@ -31,6 +31,7 @@ pub(crate) struct Chunk<'a> {
31
#[serde(rename = "_id")]
32
id: ObjectId,
33
files_id: Bson,
34
+ #[serde(serialize_with = "bson::serde_helpers::serialize_u32_as_i32")]
35
n: u32,
36
#[serde(borrow)]
37
data: RawBinaryRef<'a>,
@@ -51,7 +52,10 @@ pub struct FilesCollectionDocument {
51
52
pub length: u64,
53
54
/// The size of the file's chunks in bytes.
- #[serde(rename = "chunkSize")]
55
+ #[serde(
56
+ rename = "chunkSize",
57
+ serialize_with = "bson::serde_helpers::serialize_u32_as_i32"
58
+ )]
59
pub chunk_size_bytes: u32,
60
61
/// The time at which the file was uploaded.
0 commit comments