With the web client, The function DownloadFromStream doesnt allow to specify the client folder where to save the file. Every file is saved to the browser default transfer folder.
In my scenario I want to save a txt file to a pre configured folder.
TempFile.CREATETEMPFILE();
TempFile.WRITE('abc');
TempFile.CREATEINSTREAM(NewStream);
DOWNLOADFROMSTREAM(NewStream,'','MyFolderPath','',MyFileName);
Whats the correct approach to apply on WebClient?
0
Answers
Or if that doesn't work, how about just calling the DownloadHandler function (also in CU 419) directly?
FileOutFile.CreateTempFile;
tempFilename := FileOutFile.Name;
(...)
FileOutFile.CreateInStream(NewStream);
FileMgt.DownloadToFile(TempFileName, FileNameExp); //instead of DownloadFromStream
FileOutFile.Close();
Getting the following error: