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

GridFS Read into Buffer/IO

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Trivial - P5
    • Resolution: Won't Fix
    • None
    • 12_01_17
    • None

    Description

      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

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: