Re: [Cppcms-users] read file and download it
Brought to you by:
artyom-beilis
From: Marcel H. <ke...@co...> - 2016-03-23 23:17:53
|
On 03/23/2016 12:22 PM, mawan sugiyanto wrote: > the restriction is about file name restriction. and don't about download > mechanism? > for example if i create pdf file on the fly, and read it, and then put > on output response, is it no problem? > ? I don't get the problem. If you create a PDF a) with an external application (e.g. latex, pdfcreator, etc.) you could ether do the trick with the x-sendfile (let your webserver do the job) b) create the pdf-file in memory (e.g. with a c++ library), then you can stream the pdf straight out with `response().out() << f.rdbuf();` You don't have to read it in memory, so there should be no problem |