aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_dispatch/http/upload.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/http/upload.rb b/actionpack/lib/action_dispatch/http/upload.rb
index a8d2dc3950..afbfa58bce 100644
--- a/actionpack/lib/action_dispatch/http/upload.rb
+++ b/actionpack/lib/action_dispatch/http/upload.rb
@@ -31,6 +31,11 @@ module ActionDispatch
@headers = hash[:head]
end
+ # Shortcut for working directly with +tempfile+
+ def to_io
+ @tempfile
+ end
+
# Shortcut for +tempfile.read+.
def read(length=nil, buffer=nil)
@tempfile.read(length, buffer)