Project

General

Profile

Defect #10832 ยป rest-upload-fastcgi.patch

Jeffrey Clark, 2012-05-04 20:49

View differences:

app/models/attachment.rb
def file=(incoming_file)
unless incoming_file.nil?
@temp_file = incoming_file
if incoming_file.kind_of? Rack::RewindableInput
@temp_file = StringIO.new(incoming_file.read.to_s)
@temp_file.set_encoding(Encoding::BINARY) if @temp_file.respond_to?(:set_encoding)
else
@temp_file = incoming_file
end
if @temp_file.size > 0
if @temp_file.respond_to?(:original_filename)
self.filename = @temp_file.original_filename
    (1-1/1)