Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 4 of 4 total |
donwload a file |
Wed, Aug 30 2017 3:16 PM | Permanent Link |
Ronald | Hi,
I am trying to download a file in a ewb-webserver module. I use this (it downloads a small .txt file): Request.SendCustomContent(TempList.Text,'application/octet-stream',Format('attachment; filename="%s %s;"',[DateToStr(Date),'test.txt'])); The content is indeed sent back to the client (I can see it in the pagecontent), but the client does not respond with the dialog: "Do you want to save this file?" With IIS this always worked fine. What am I doing wrong? Greetings, Ronald |
Wed, Aug 30 2017 3:25 PM | Permanent Link |
Ronald | Templist.Text is a TStringList with some text in it.
|
Thu, Aug 31 2017 1:06 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Ronald,
<< I am trying to download a file in a ewb-webserver module. I use this (it downloads a small .txt file): Request.SendCustomContent(TempList.Text,'application/octet-stream',Format('attachment; filename="%s %s;"',[DateToStr(Date),'test.txt'])); The content is indeed sent back to the client (I can see it in the pagecontent), but the client does not respond with the dialog: "Do you want to save this file?" With IIS this always worked fine. What am I doing wrong? >> How are you requesting the content ? If you're using a TServerRequest in an EWB client application, then the browser won't automatically handle the response. In order to do that, you have to allow the user to click on a link that initiates the download request to the web server. Tim Young Elevate Software www.elevatesoft.com |
Thu, Aug 31 2017 1:52 PM | Permanent Link |
Ronald | Tim Young [Elevate Software] wrote:
<How are you requesting the content ? If you're using a TServerRequest in an EWB client application, then the browser won't automatically handle the response. In order to do that, you have to allow the user to click on a link that initiates the download request to the web server.> Yes, it is a TServerRequest. I will change it and have it send back the url and let the browserclient respond with a little dialog where the user can click on a TLink. Ronald |
This web page was last updated on Friday, December 6, 2024 at 05:39 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |