Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-368

GridFS Read into Buffer/IO

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Trivial - P5 Trivial - P5
    • 12_01_17
    • Affects Version/s: None
    • Component/s: None

      The GridFS Ruby Driver should be able to read from GridFS into a buffer passed into #read. That buffer should be permitted to be a String, StringIO, or IO.

      Tempfile.open("from-gridfs") do |f|
      gridfs = Mongo::GridFileSystem.new(Mongoid.database)
      gridfs_file = gridfs.open(path, 'r')
      gridfs_file.read(f, 4096) until gridfs_file.eof?
      end

            Assignee:
            emily.stolfo Emily Stolfo
            Reporter:
            y_feldblum Jay Feldblum
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: