Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid create multiple large copies of uploaded file data in memory #286

Merged
merged 3 commits into from
Apr 30, 2022

Commits on Apr 29, 2022

  1. Avoid create multiple large copies of uploaded file data in memory

    Add UploadedFile#append_to(buffer), to append to the given buffer
    in chunks using readpartial with an outbuf, rewinding the tempfile
    before and after (the tempfile that UploadedFile creates should
    always be seekable).  Switch Utils.build_file_part to use this
    method.
    
    This should result in a general decrease in memory usage for
    large files, and the rewinding fixes rack#261.
    
    This uses the updated spec from rack#268.
    
    Co-authored-by: Jeremy Evans <code@jeremyevans.net>
    dervish86 and jeremyevans committed Apr 29, 2022
    Configuration menu
    Copy the full SHA
    5fa43fc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3e40e58 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a1c033e View commit details
    Browse the repository at this point in the history