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

GridFS Read into Buffer/IO

    XMLWordPrintable

    Details

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

      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

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

              Dates

              Created:
              Updated:
              Resolved: