justin@curationexperts.com
2013-Mar-22 16:12 UTC
Should to_io be added to ActionDispatch::Http::UploadedFile?
In rest-client/rest-client#144<https://github.com/rest-client/rest-client/issues/144#issuecomment-14876580> we''re trying to handle objects that behave like IO. Some have suggested that respond_to?(:read) is a poor test of this and have suggested using IO.try_covert(obj) instead. My counter example for this is ActionDispatch::Http::UploadedFile. I''m wondering if there would be any support for adding this method? I''d be happy to craft a pull request. See: http://www.ruby-doc.org/core-2.0/IO.html#method-c-try_convert Justin Coyne -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-core+unsubscribe@googlegroups.com. To post to this group, send email to rubyonrails-core@googlegroups.com. Visit this group at http://groups.google.com/group/rubyonrails-core?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Seemingly Similar Threads
- How to retrieve a FileBlob from 'ActionDispatch::Http::UploadedFile' instance?
- Converting an Uploaded File to a string while maintaining binary data
- TypeError: no implicit conversion of Symbol into Hash when submitting form to upload files
- Can't use ActionDispatch::Request in Rails middleware because path_parameters get lost
- [PATCH] ActionDispatch MemCacheStore violates encapsulation principle