Skip to content

Commit 93a85d7

Browse files
patrickfreedskriptble
authored andcommitted
GODRIVER-886 Fix panic when using non-ObjectID fileID in bucket.OpenDownloadStream
1 parent c72645a commit 93a85d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mongo/gridfs/bucket.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ func (b *Bucket) openDownloadStream(filter interface{}, opts ...*options.FindOpt
351351
return newDownloadStream(nil, b.chunkSize, 0), nil
352352
}
353353

354-
chunksCursor, err := b.findChunks(ctx, fileIDElem.ObjectID())
354+
chunksCursor, err := b.findChunks(ctx, fileIDElem)
355355
if err != nil {
356356
return nil, err
357357
}

0 commit comments

Comments
 (0)