DirectoryPath := 'C:\run'; fileMgt.GetServerDirectoryFilesListInclSubDirs(TempNameValueBuffer, DirectoryPath); if TempNameValueBuffer.FindSet() then repeat if fileMgt.GetFileName(TempNameValueBuffer.Name) = 'start.ps1' then begin fileMgt.BLOBImportFromServerFile(TempBlob, TempNameValueBuffer.Name); if TempBlob.HasValue() then begin TempBlob.CreateInStream(InStr); InStr.ReadText(qTexto); end; exit; end; until TempNameValueBuffer.Next() = 0;
Answers
If your app target is "OnPrem"
You can use the file management codeunit.
Regards.
How @ftornero? It's not allowed to use UploadFileSilent in a BC16 extension?
Message in Dutch saying 'This action is not available for the online version of the app.'
You can use something like that:
But the paths and files must be in the server, you don't have access to the client file system, later on with the InStream you can do whatever you want.
Regards