2018-10-06 19:10:08 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-01-11 18:12:34 -05:00
|
|
|
class CarrierWaveStringFile < StringIO
|
2020-07-07 17:09:13 -04:00
|
|
|
def original_filename
|
|
|
|
""
|
2018-01-11 18:12:34 -05:00
|
|
|
end
|
2020-08-21 11:10:03 -04:00
|
|
|
|
|
|
|
def self.new_file(file_content:, filename:, content_type: "application/octet-stream")
|
|
|
|
{
|
|
|
|
"tempfile" => StringIO.new(file_content),
|
|
|
|
"filename" => filename,
|
|
|
|
"content_type" => content_type
|
|
|
|
}
|
|
|
|
end
|
2018-01-11 18:12:34 -05:00
|
|
|
end
|