Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

stringio original_filename

data = StringIO.new(file_data)
data.class.class_eval { attr_accessor :original_filename, :content_type }

data.content_type = content_type
data.original_filename = file_name

object.attachment = data
Source by www.titanwolf.org #
 
PREVIOUS NEXT
Tagged: #stringio
ADD COMMENT
Topic
Name
2+4 =