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 1715097 commit 5089f6fCopy full SHA for 5089f6f
mongo/gridfs/download_stream.go
@@ -242,7 +242,14 @@ func (ds *DownloadStream) fillBuffer(ctx context.Context) error {
242
return err
243
}
244
245
- if chunkIndex.Int32() != ds.expectedChunk {
+ var chunkIndexInt32 int32
246
+ if chunkIndexInt64, ok := chunkIndex.Int64OK(); ok {
247
+ chunkIndexInt32 = int32(chunkIndexInt64)
248
+ } else {
249
+ chunkIndexInt32 = chunkIndex.Int32()
250
+ }
251
+
252
+ if chunkIndexInt32 != ds.expectedChunk {
253
return ErrWrongIndex
254
255
0 commit comments