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

Wrong example in mongofiles docs page

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: tools
    • Labels:
      None
    • Last comment by Customer:
      true
    • Story Points:
      2
    • Sprint:
      ServerDocs2020: Aug24 - Aug31, ServerDocs2020: Aug31 - Sep07, ServerDocs2020: Sep8 - Sep14

      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

            Assignee:
            andrew.feierabend Andrew Feierabend
            Reporter:
            kevin.adistambha Kevin Adistambha
            Participants:
            Last commenter:
            Andrew Feierabend Andrew Feierabend
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since reply:
              45 weeks, 6 days ago
              Date of 1st Reply: