RESTRequest4Delphi icon indicating copy to clipboard operation
RESTRequest4Delphi copied to clipboard

RESTRequest4D.Request.NetHTTP.pas(246): E2010 Incompatible types: 'string' and 'Boolean'

Open tibaros opened this issue 1 year ago • 0 comments

I have a problem compiling the latest versions, I never had such problems before.

function TRequestNetHTTP.AddFile(const AFieldName: string; const AValue: TStream; const AFileName: string; const AContentType: string): IRequest; {$IF COMPILERVERSION >= 33.0} var LFileName: string; {$ENDIF} begin Result := Self; if not Assigned(AValue) then Exit; {$IF COMPILERVERSION >= 33.0} LFileName := Trim(AFileName); if (LFileName = EmptyStr) then LFileName := AFieldName; AValue.Position := 0; {$IF COMPILERVERSION >= 34.0} FMultipartFormData.AddStream(AFieldName, AValue, True, LFileName, AContentType); //----------> HERE ERROR!!! {$ELSE} FMultipartFormData.AddStream(AFieldName, AValue, LFileName, AContentType); {$ENDIF} FUseMultipartFormData := True; {$ENDIF} end;

tibaros avatar Sep 06 '24 17:09 tibaros