[DOCS-13851] Wrong example in mongofiles docs page Created: 26/Aug/20  Updated: 30/Oct/23  Resolved: 10/Sep/20

Status: Closed
Project: Documentation
Component/s: tools
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Bug Priority: Major - P3
Reporter: Kevin Adistambha Assignee: Andrew Feierabend (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 3 years, 21 weeks, 6 days ago
Epic Link: DOCSP-11348
Story Points: 2

 Description   

Description

In the examples section of https://docs.mongodb.com/database-tools/mongofiles/:

To fetch the file from the GridFS collection in the records database with _id: ObjectId("56feac751f417d0357e7140f"), you can use the following command:

mongofiles -d=records get_id 'ObjectId("56feac751f417d0357e7140f")'

Running this command resulted in an error:

Failed: error parsing id as Extended JSON: invalid JSON number. Position: 18

The correct command should be:

mongofiles -d=test get_id '{"$oid": "56feac751f417d0357e7140f"}'

Note that this incorrect example has caused some confusion in the Developer Forums.

Scope of changes

Impact to Other Docs

MVP (Work and Date)

Resources (Scope or Design Docs, Invision, etc.)



 Comments   
Comment by Githook User [ 10/Sep/20 ]

Author:

{'name': 'Andrew Feierabend', 'email': 'andrew.feierabend@mongodb.com', 'username': 'andf-mongodb'}

Message: DOCS-13851 correct OID example for mongofiles in manual
Branch: v4.2
https://github.com/mongodb/docs/commit/f95d3535bb5af8cf214af2e25fef3aeaadbab59c

Comment by Githook User [ 10/Sep/20 ]

Author:

{'name': 'Andrew Feierabend', 'email': 'andrew.feierabend@mongodb.com', 'username': 'andf-mongodb'}

Message: DOCS-13851 correct oid example in mongofiles
Branch: master
https://github.com/mongodb/docs-commandline-tools/commit/87f37242301c3fe093eaeb4c16a687a0d2c4728c

Generated at Thu Feb 08 08:08:53 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.