mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-15 07:45:54 +01:00
Compatibility fix with Delphi Sydney when adding Streams to form-data in TMVCRESTClient
Some checks are pending
TOC Generator / TOC Generator (push) Waiting to run
Some checks are pending
TOC Generator / TOC Generator (push) Waiting to run
This commit is contained in:
parent
53d8efd048
commit
913b9cb3c2
@ -310,6 +310,11 @@ type
|
||||
{$IF defined(RIOORBETTER)}
|
||||
function AddFile(const aName: string; aFileStreamValue: TStream; const aFileName: string = '';
|
||||
const aContentType: string = ''): IMVCRESTClient; overload;
|
||||
{$IF defined(ATHENSORBETTER)} deprecated 'Use AddFile with AOwnsStream parameter'; {$ENDIF}
|
||||
{$ENDIF}
|
||||
{$IF defined(ATHENSORBETTER)}
|
||||
function AddFile(const aName: string; aFileStreamValue: TStream; AOwnsStream: Boolean; const aFileName: string = '';
|
||||
const aContentType: string = ''): IMVCRESTClient; overload;
|
||||
{$ENDIF}
|
||||
function AddBodyFieldFormData(const aName, aValue: string): IMVCRESTClient; overload;
|
||||
{$IF defined(RIOORBETTER)}
|
||||
|
@ -397,6 +397,10 @@ type
|
||||
function AddFile(const aName: string; aFileStreamValue: TStream; const aFileName: string = '';
|
||||
const aContentType: string = ''): IMVCRESTClient; overload;
|
||||
{$ENDIF}
|
||||
{$IF defined(ATHENSORBETTER)}
|
||||
function AddFile(const aName: string; aFileStreamValue: TStream; aOwnsStream: Boolean; const aFileName: string = '';
|
||||
const aContentType: string = ''): IMVCRESTClient; overload;
|
||||
{$ENDIF}
|
||||
|
||||
function AddBodyFieldFormData(const aName, aValue: string): IMVCRESTClient; overload;
|
||||
{$IF defined(RIOORBETTER)}
|
||||
@ -721,11 +725,16 @@ end;
|
||||
function TMVCRESTClient.AddFile(const aName: string; aFileStreamValue: TStream; const aFileName, aContentType: string): IMVCRESTClient;
|
||||
begin
|
||||
Result := Self;
|
||||
{$IF Defined(ATHENSORBETTER)}
|
||||
GetBodyFormData.AddStream(aName, aFileStreamValue, False, aFileName, aContentType);
|
||||
{$ELSE}
|
||||
GetBodyFormData.AddStream(aName, aFileStreamValue, aFileName, aContentType);
|
||||
{$ENDIF}
|
||||
SetContentType(TMVCMediaType.MULTIPART_FORM_DATA);
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
{$IF defined(ATHENSORBETTER)}
|
||||
function TMVCRESTClient.AddFile(const aName: string; aFileStreamValue: TStream; aOwnsStream: Boolean; const aFileName, aContentType: string): IMVCRESTClient;
|
||||
begin
|
||||
Result := Self;
|
||||
GetBodyFormData.AddStream(aName, aFileStreamValue, aOwnsStream, aFileName, aContentType);
|
||||
SetContentType(TMVCMediaType.MULTIPART_FORM_DATA);
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
Loading…
Reference in New Issue
Block a user