gitlab-org--gitlab-foss/lib/carrier_wave_string_file.rb

16 lines
333 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class CarrierWaveStringFile < StringIO
def original_filename
""
end
def self.new_file(file_content:, filename:, content_type: "application/octet-stream")
{
"tempfile" => StringIO.new(file_content),
"filename" => filename,
"content_type" => content_type
}
end
end