aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/uploaded_file.rb
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2009-01-17 20:29:50 -0600
committerJoshua Peek <josh@joshpeek.com>2009-01-17 20:29:50 -0600
commitff0a2678c4bce9da348e1263915558795e3a3640 (patch)
tree3c5b6ab01afaa3d01198d8755e1dc38fa18f5af4 /actionpack/lib/action_controller/uploaded_file.rb
parentaab760c3df4c02377a59a418fc077cdbc07e9fdc (diff)
downloadrails-ff0a2678c4bce9da348e1263915558795e3a3640.tar.gz
rails-ff0a2678c4bce9da348e1263915558795e3a3640.tar.bz2
rails-ff0a2678c4bce9da348e1263915558795e3a3640.zip
Build query string and POST params parser on top of Rack::Request. Also switch our multipart parser to use Racks. Moved XML, JSON, and YAML parsers into ActionController::ParamsParser middleware [#1661 state:resolved]
Diffstat (limited to 'actionpack/lib/action_controller/uploaded_file.rb')
-rw-r--r--actionpack/lib/action_controller/uploaded_file.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/uploaded_file.rb b/actionpack/lib/action_controller/uploaded_file.rb
index ea4845c68f..376ba3621a 100644
--- a/actionpack/lib/action_controller/uploaded_file.rb
+++ b/actionpack/lib/action_controller/uploaded_file.rb
@@ -7,6 +7,13 @@ module ActionController
end
end
+ def self.extended(object)
+ object.class_eval do
+ attr_accessor :original_path, :content_type
+ alias_method :local_path, :path
+ end
+ end
+
# Take the basename of the upload's original filename.
# This handles the full Windows paths given by Internet Explorer
# (and perhaps other broken user agents) without affecting