I created a simple DataSnap REST server in Delphi XE2 and i have a method which returns a TStream object to transfer a file. This works well but when i try to download a big file (~2,5GB) i got an
"out of memory"
error message on the server side.
I would like to download the file via internet browser (http://localhost:8080/datasnap/rest/TServerMethods1/GetFile).
Can rest service return big files?
I read this question and tryed that solution which works well when i use a small file.
Here is my simple code:
function TServerMethods1.GetFile: TStream;
var
FileStream: TFileStream;
begin
FileStream := TFileStream.Create('d:\file.exe', fmOpenRead);
Result := FileStream;
end;
How can i download a big file from a REST server via internet browser?