aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/uploaded_file.rb
diff options
context:
space:
mode:
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