attachment view

This commit is contained in:
Eugene Korbut 2009-02-08 06:18:14 +10:00
parent 9c9ccc429d
commit f5edf91670
2 changed files with 8 additions and 8 deletions

View file

@ -438,11 +438,11 @@ class WebmailController < ApplicationController
else
disposition = "attachment"
end
@headers['Content-Length'] = part.body.size
@response.headers['Accept-Ranges'] = 'bytes'
@headers['Content-type'] = part.content_type.strip
@headers['Content-Disposition'] = disposition << %(; filename="#{part.header['content-type']['name']}")
render_text part.body
headers['Content-Length'] = part.body.size
response.headers['Accept-Ranges'] = 'bytes'
headers['Content-type'] = part.content_type.strip
headers['Content-Disposition'] = disposition << %(; filename="#{part.header['content-type']['name']}")
render :text => part.body
end
def get_parts(mail)