Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-24288

How to pass credentials in Gridfs object

    XMLWordPrintableJSON

Details

    • Icon: Question Question
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • 3.2.6
    • GridFS
    • None

    Description

      Hi,

      I am not able get file from mongodb using gridfs with authentication.
      If i am working without --auth (authentication it will working fine)
      but if i am apply authentication on database with --auth and run server
      i didn't get file from database and got error like below.

      Command find failed: not authorized on DBName to execute command

      { find: "fs.files", filter: { _id: ObjectId('572a0283fb7f1d15e82f3b8a') }, sort: { uploadDate: -1 }, skip: 0, limit: 1, noCursorTimeout: false }
      

      Notice : this issue occurred only on authentication for find document of file.
      i was store image file in db its saved successfully but at the time of retrieve that image file error will occurred.

      Thanks you.

      Attachments

        Activity

          People

            Unassigned Unassigned
            shaikh.a@droisys.com Aslam Shaikh
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: