uses Soap.EncdDecd;
(bpl : soaprtl240.bpl)

function EncodeFile(const FileName: string): AnsiString;
var
  msStream: TMemoryStream;
begin
  msStream := TMemoryStream.Create;
  try
    msStream.LoadFromFile(Filename);
    Result := EncodeBase64(msStream.Memory, msStream.Size);
  finally
    FreeAndNil(msStream);
  end;
end;


+ Recent posts