The function TServerMethods. DownLoadFile (AFileName: string) : TMemoryStream;
The begin
If FileExists (AFileName) then
The begin
Result:=TMemoryStream. Create;
Result. The LoadFromFile (AFileName);
The end;
The end;
To build a VCL app use idhttp to invoke this method, when idhttp after downloading the file, actually this server module will not release, if the server-side method is to return to the simple data types, such as integer, string, etc., after the client calls, the server module is automatically released, the server is set to the Invocation, if anyone has the environment, help me to test, or tell me the solution, xe5 xe6 and such
CodePudding user response:
Hey, how no one