Thank you note my controller has to return several data too the page html displayed by this controllers displays pics , link to pdf ... How can i do ? thank you
Le jeu. 24 sept. 2020 à 17:10, Clemens <clemens.odend...@claret-clover.de> a écrit : > Have a try! > > response.title = 'Your Document Title' > response.headers['Content-Type'] = 'application/pdf' > response.headers['Content-Disposition']='inline' > > return response.stream(<location of PDF file to be streamed>) > > I prefer the user to decide what to do (save or view in default browser) > by > response.title = 'Your Document Title' > response.headers['Content-Type'] = 'application/pdf' > response.headers['Content-Disposition']='attachment; filename= > {}.pdf'.format(request.vars.filename) > > return response.stream(<location of PDF file to be streamed>) > > Best regards > Clemens > > On Thursday, September 24, 2020 at 4:54:53 PM UTC+2 lcham...@gmail.com > wrote: > >> Hi, >> i have a controller with this : >> response.headers['Content-Disposition'] = 'inline; filename=%s' % >> request.vars.filename >> >> to force streaming the pdf file , and i do not why it does not work .. >> any idea ? >> >> Thank you >> >> >> > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list (Report Issues) > --- > You received this message because you are subscribed to a topic in the > Google Groups "web2py-users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/web2py/F7nWHxb_6OI/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > web2py+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/web2py/a5acb3fc-db71-4a9e-b94a-0ada13caf029n%40googlegroups.com > <https://groups.google.com/d/msgid/web2py/a5acb3fc-db71-4a9e-b94a-0ada13caf029n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- *Laurent Chambon <lchambo...@gmail.com>* *47 rue Pougnet* *33400 Talence* *06 64 13 71 16 * -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/CAA-7DRuXfhYXGR8dNDcZJVsqVqBWJNWCGbaD5999ErAFgsh%2Bzg%40mail.gmail.com.