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

How to pass credentials in Gridfs object

    • Type: Icon: Question Question
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.2.6
    • Component/s: GridFS
    • None

      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.

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

              Created:
              Updated:
              Resolved: