Link to home
Start Free TrialLog in
Avatar of undergroundo
undergroundo

asked on

Returning a File from a TWebAction (revisited)

I have a WebBroker App that returns a file thru a TWebAction. It does so by pointing to the following link:

http://ServerName/ISAPI_AppName/WebActionName?File=FileName

The program then generates the file from a DB field and returns it. The problem is that, when the Save to Disk windos appears it shows the file to save as "WebActionName" instead of "FileName".

How can I make the file to be returned with the right name?

Code:

    Response.ContentStream := SomeStreamWithTheFileInside;
    Response.ContentType := 'application/octet-stream';
    Response.SendResponse;
ASKER CERTIFIED SOLUTION
Avatar of BlackTigerX
BlackTigerX

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial