Title: DataRequest and RtcInfo Post by: Pieter 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 Title: Re: DataRequest and RtcInfo Post by: D.Tkalcec (RTC) 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 Title: Re: DataRequest and RtcInfo Post by: Pieter 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 Title: Re: DataRequest and RtcInfo Post by: D.Tkalcec (RTC) 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 (http://www.realthinclient.com/sf/index.php?topic=12.0).
Best Regards, Danijel Tkalcec |