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 := SomeStreamWithTheFileInsid e;
Response.ContentType := 'application/octet-stream' ;
Response.SendResponse;
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 := SomeStreamWithTheFileInsid
Response.ContentType := 'application/octet-stream'
Response.SendResponse;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.