RTC Forums
November 24, 2024, 01:35:03 AM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Help
Login
Register
RTC Forums
>
Subscription
>
Support
>
DataRequest and RtcInfo
Pages: [
1
]
« previous
next »
Print
Author
Topic: DataRequest and RtcInfo (Read 4909 times)
Pieter
RTC Expired
Posts: 17
DataRequest and RtcInfo
«
on:
August 15, 2016, 09:45:26 PM »
Hi Danijel,
I am trying to get the client to send a file to the server along with some information.
The client side looks like this:
------------------------------------------------------------------------------
var
DataRequest: TRtcDataRequest;
ServerFile, LocalFile: string;
procedure ButtonClick
begin
with DataRequest do
begin
Request.Query['file'] := URL_Encode(Utf8Encode(ServerFile));
Request.Info.asText['file'] := LocalFile;
Request.Info.asText['value1'] := 'ABC';
Request.Info.asText['value2'] := '123';
Post;
if not WaitForCompletion(False,30,True) then
CancelRequests;
end;
end;
procedure BeginRequest
begin
with TRtcDataClient(Sender) do
begin
Request.Method := 'PUT';
Request.FileName := '/UPLOAD';
Request.Host := ServerAddr;
Request.ContentLength := File_Size(Request.Info.asText['file']);
WriteHeader;
end;
end;
------------------------------------------------------------------------------
When received on the server (CheckRequest),
value1
and
value2
are empty.
How can I fix this?
Thank you in advance,
Pieter
Logged
D.Tkalcec (RTC)
Administrator
Posts: 1881
Re: DataRequest and RtcInfo
«
Reply #1 on:
August 15, 2016, 10:00:43 PM »
The "Info" property on
all
RTC components is local. It is NEVER sent to the other side.
Best Regards,
Danijel Tkalcec
Logged
Pieter
RTC Expired
Posts: 17
Re: DataRequest and RtcInfo
«
Reply #2 on:
August 16, 2016, 11:13:14 AM »
I put the strings in the Request.Agent property and that works.
But if there is a better way please let me know.
Best regards,
Pieter
Logged
D.Tkalcec (RTC)
Administrator
Posts: 1881
Re: DataRequest and RtcInfo
«
Reply #3 on:
August 16, 2016, 03:05:42 PM »
If you are just starting to use the RTC SDK and are looking for learning material, I strongly recommend
THIS FAQ TOPIC
.
Best Regards,
Danijel Tkalcec
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Dashboard
-----------------------------
=> General
=> 3rd-Party
=> Quick Start
-----------------------------
Subscription
-----------------------------
=> Support
Loading...