How to set _id in gridfs and append to a file in gridfs?

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: API
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      I can use gridfs to do the initial loading with storeFile function. How can I set the _id field for future appending data to the file?

      I think I should use GridFileBuilder class, but I didn't find any example in the cxx driver. Can someone help provide an example?

      Basically, I want insert data to
      dbname.collection_files:
      {_id:"unique_string", filename:"my_file_name"...}

      After a while, the "my_file_name" would have something append to the end, and I want to append the data based on "unique_string" to the gridfs for the same data.

      How can I do it?

      Thanks in advance!

            Assignee:
            Unassigned
            Reporter:
            Yuncong Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: