Thread: [Cppcms-users] read file and download it
Brought to you by:
artyom-beilis
From: mawan s. <ma...@gm...> - 2016-03-21 06:57:00
|
Dear All how to read file and put on response().out() as downloaded content? Thanks Mawan |
From: Marcel H. <ke...@co...> - 2016-03-22 23:32:19
Attachments:
signature.asc
|
just don't http://cppcms.com/wikipp/en/page/cppcms_1x_serving_static_files On 03/21/2016 07:56 AM, mawan sugiyanto wrote: > Dear All > > how to read file and put on response().out() as downloaded content? > > > Thanks > > > Mawan > > > ------------------------------------------------------------------------------ > Transform Data into Opportunity. > Accelerate data analysis in your applications with > Intel Data Analytics Acceleration Library. > Click to learn more. > http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140 > > > > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: mawan s. <ma...@gm...> - 2016-03-23 11:17:42
|
Thankyou Marcel. On Wed, Mar 23, 2016 at 6:07 AM, Marcel Hellwig <ke...@co...> wrote: > just don't > > http://cppcms.com/wikipp/en/page/cppcms_1x_serving_static_files > > On 03/21/2016 07:56 AM, mawan sugiyanto wrote: > > Dear All > > > > how to read file and put on response().out() as downloaded content? > > > > > > Thanks > > > > > > Mawan > > > > > > > ------------------------------------------------------------------------------ > > Transform Data into Opportunity. > > Accelerate data analysis in your applications with > > Intel Data Analytics Acceleration Library. > > Click to learn more. > > http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140 > > > > > > > > _______________________________________________ > > Cppcms-users mailing list > > Cpp...@li... > > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > > ------------------------------------------------------------------------------ > Transform Data into Opportunity. > Accelerate data analysis in your applications with > Intel Data Analytics Acceleration Library. > Click to learn more. > http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140 > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > |
From: mawan s. <ma...@gm...> - 2016-03-23 11:23:15
|
Dear Marcel 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? Thankyou On Wed, Mar 23, 2016 at 6:16 PM, mawan sugiyanto <ma...@gm...> wrote: > Thankyou Marcel. > > > > On Wed, Mar 23, 2016 at 6:07 AM, Marcel Hellwig <ke...@co...> > wrote: > >> just don't >> >> http://cppcms.com/wikipp/en/page/cppcms_1x_serving_static_files >> >> On 03/21/2016 07:56 AM, mawan sugiyanto wrote: >> > Dear All >> > >> > how to read file and put on response().out() as downloaded content? >> > >> > >> > Thanks >> > >> > >> > Mawan >> > >> > >> > >> ------------------------------------------------------------------------------ >> > Transform Data into Opportunity. >> > Accelerate data analysis in your applications with >> > Intel Data Analytics Acceleration Library. >> > Click to learn more. >> > http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140 >> > >> > >> > >> > _______________________________________________ >> > Cppcms-users mailing list >> > Cpp...@li... >> > https://lists.sourceforge.net/lists/listinfo/cppcms-users >> > >> >> >> >> ------------------------------------------------------------------------------ >> Transform Data into Opportunity. >> Accelerate data analysis in your applications with >> Intel Data Analytics Acceleration Library. >> Click to learn more. >> http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140 >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> >> > |
From: Marcel H. <ke...@co...> - 2016-03-23 23:17:53
Attachments:
signature.asc
|
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 |