Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-13851

Wrong example in mongofiles docs page

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • None
    • tools
    • None
    • 2
    • ServerDocs2020: Aug24 - Aug31, ServerDocs2020: Aug31 - Sep07, ServerDocs2020: Sep8 - Sep14
    • true

    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.)

      Attachments

        Activity

          People

            andrew.feierabend@mongodb.com Andrew Feierabend (Inactive)
            kevin.adistambha@mongodb.com Kevin Adistambha
            Andrew Feierabend Andrew Feierabend (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              1 year, 48 weeks, 2 days ago