Commit 16f707ec by Ylan Segal Committed by Jon Yurek

Bringing back functionality to allow StringioAdapter to accept content_type and original_filename

parent 9fc74e07
......@@ -6,6 +6,7 @@ module Paperclip
@tempfile = copy_to_tempfile(@target)
end
attr_writer :original_filename, :content_type
private
def cache_current_values
......
......@@ -36,6 +36,16 @@ class StringioFileProxyTest < Test::Unit::TestCase
should "return the data contained in the StringIO" do
assert_equal "abc123", @subject.read
end
should 'accept a content_type' do
@subject.content_type = 'image/png'
assert_equal 'image/png', @subject.content_type
end
should 'accept an orgiginal_filename' do
@subject.original_filename = 'image.png'
assert_equal 'image.png', @subject.original_filename
end
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment