diff options
author | George Claghorn <george.claghorn@gmail.com> | 2019-02-23 20:03:57 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-23 20:03:57 -0500 |
commit | d4d53ec4266dc99554c8d05707f8db6294ce46ac (patch) | |
tree | f8693dd262d4a829874ea07670a8d96725e93db5 /actionpack/lib | |
parent | e87a833c9720bc2cc445348391a7b52692c9c7fb (diff) | |
parent | 32b2942946edba6a288c6b992109598eeb626964 (diff) | |
download | rails-d4d53ec4266dc99554c8d05707f8db6294ce46ac.tar.gz rails-d4d53ec4266dc99554c8d05707f8db6294ce46ac.tar.bz2 rails-d4d53ec4266dc99554c8d05707f8db6294ce46ac.zip |
Merge pull request #35382 from janko/restore-io-copy-stream-compatibility-with-uploaded-file
Restore ActionDispatch::Http::UploadedFile compatibility with IO.copy_stream
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_dispatch/http/upload.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/http/upload.rb b/actionpack/lib/action_dispatch/http/upload.rb index 827f022ca2..0da8f5c14e 100644 --- a/actionpack/lib/action_dispatch/http/upload.rb +++ b/actionpack/lib/action_dispatch/http/upload.rb @@ -20,7 +20,6 @@ module ActionDispatch # A +Tempfile+ object with the actual uploaded file. Note that some of # its interface is available directly. attr_accessor :tempfile - alias :to_io :tempfile # A string with the headers of the multipart request. attr_accessor :headers @@ -84,6 +83,10 @@ module ActionDispatch def eof? @tempfile.eof? end + + def to_io + @tempfile.to_io + end end end end |