Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-573

GridFS put() to handle uploading very large files

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • Fully Compatible

      GridFS.put() performs a read on 'data' which is a string of bytes or a file-like object with a read() method. For a file whose size is larger than the amount of available system memory this can create a out-of-memory kill from the operating system.

      I've forked the python driver and modified put() to accept a keyword 'huge' that when presented with a file-like object will read 'chunk_size' bytes from the file-object at a time (with chunk_size gotten from the GridIn object).

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            paul.mackin Paul Mackin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: