def savebinary
storename = Digest::MD5.hexdigest(@params['work']['binary'].read)
@params['work']['binary'].rewind
File.open("files/#{@params['work']['storename']}", "w") do
|f| f.write(@params['work']['binary'].read)
end
return storename
end
def showbinary(filename,contenttype)
path = File.expand_path(filename)
send_file path, :type => contenttype, :disposition => 'inline'
end