diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2007-04-25 17:25:44 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2007-04-25 17:25:44 +0000 |
commit | 6a85955642606aa3159ea8e4d24fbc77a1fc5e94 (patch) | |
tree | 616c37e17c1b14fbece4a319fc41ee63dba78072 /activesupport/CHANGELOG | |
parent | 54bc5ca8d97b7ef8640686e50168ba25d7f23d27 (diff) | |
download | rails-6a85955642606aa3159ea8e4d24fbc77a1fc5e94.tar.gz rails-6a85955642606aa3159ea8e4d24fbc77a1fc5e94.tar.bz2 rails-6a85955642606aa3159ea8e4d24fbc77a1fc5e94.zip |
Added parsing of file type in Hash.xml_in so you can easily do file uploads with base64 from an API [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6578 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/CHANGELOG')
-rw-r--r-- | activesupport/CHANGELOG | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/activesupport/CHANGELOG b/activesupport/CHANGELOG index ea734dcddf..018d6e977c 100644 --- a/activesupport/CHANGELOG +++ b/activesupport/CHANGELOG @@ -1,5 +1,21 @@ *SVN* +* Added parsing of file type in Hash.xml_in so you can easily do file uploads with base64 from an API [DHH] + + <person> + <name>David</name> + <avatar type="file" name="me.jpg" content_type="image/jpg">R0lGODlhkACZAPUAAM5lcfjrtMQCG=\n</avatar> + </person> + + ...becomes: + + attributes = { :person => { :name => "David", :avatar => #<StringIO> } } + attributes[:person][:avatar].content_type # => "image/jpg" + attributes[:person][:avatar].original_filename # => "me.jpg" + attributes[:person][:avatar].read # => binary data of the file + + Which is duck-type compatible with the files that you get when doing multipart uploads through HTML. + * Improved multibyte performance by relying less on exception raising #8159 [Blaine] * Use XSD-compatible type names for Hash#to_xml and make the converters extendable #8047 [Tim Pope] |