I did it in such way class Download: def GET(self, id): web.header('Content-Type', attachment.type) # file type web.header('Content-disposition', 'attachment; filename=' + attachment.file_name) # force browser to show "Save as" dialog. return data # your blob
> and how to process the mime? When you upload file, FieldStorage instance contains mime type in "type" property. On Sat, Jan 8, 2011 at 7:02 PM, Yunfan Jiang <jyf1...@gmail.com> wrote: > i want to make a file download site by web.py > and the file content which i store in database using blob, so how can > i response the file value to user? and how to process the mime? > > -- > welcom to gtalk me > http://hi.baidu.com/jyf1987 > > -- > You received this message because you are subscribed to the Google Groups > "web.py" group. > To post to this group, send email to we...@googlegroups.com. > To unsubscribe from this group, send email to > webpy+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/webpy?hl=en. > > -- Best regards, Sergei Sadovski -- You received this message because you are subscribed to the Google Groups "web.py" group. To post to this group, send email to we...@googlegroups.com. To unsubscribe from this group, send email to webpy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/webpy?hl=en.