Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

Load file content to the TWebMemo

 Post Reply Post Reply
Author
Alex Egorov View Drop Down
New Member
New Member
Avatar

Joined: 04 May 2017
Posts: 9
Post Options Post Options   Quote Alex Egorov Quote  Post ReplyReply Direct Link To This Post Topic: Load file content to the TWebMemo
    Posted: 28 Aug 2018 at 12:21pm
Hello,

Can you provide any example how to load any text file to the TWebMemo component on the web application by button click (not local file, but from the server side). Also transfer should be encrypted.

You have very good components but also you need to add many examples!
Back to Top
Bruno Fierens View Drop Down
TMS Support
TMS Support
Avatar

Joined: 11 May 2010
Posts: 7960
Post Options Post Options   Quote Bruno Fierens Quote  Post ReplyReply Direct Link To This Post Posted: 28 Aug 2018 at 3:40pm
If your file is available as a resource URL over HTTPS, this should take care of encryption.
You can use then the WebHttpRequest component, perform a HTTPS GET request and get the file content from the OnResponse event and fill the TWebMemo with the retrieved text.
Back to Top
Alex Egorov View Drop Down
New Member
New Member
Avatar

Joined: 04 May 2017
Posts: 9
Post Options Post Options   Quote Alex Egorov Quote  Post ReplyReply Direct Link To This Post Posted: 28 Aug 2018 at 3:42pm
I mean client-server application, server side started on the Windows system
Back to Top
Bruno Fierens View Drop Down
TMS Support
TMS Support
Avatar

Joined: 11 May 2010
Posts: 7960
Post Options Post Options   Quote Bruno Fierens Quote  Post ReplyReply Direct Link To This Post Posted: 28 Aug 2018 at 3:44pm
Over what protocol do you expect the data to be transferred if my answer to use HTTPS is not what you need?
Back to Top
Alex Egorov View Drop Down
New Member
New Member
Avatar

Joined: 04 May 2017
Posts: 9
Post Options Post Options   Quote Alex Egorov Quote  Post ReplyReply Direct Link To This Post Posted: 28 Aug 2018 at 3:50pm
Question about protocol too. What I need: start my own server part on the Windows and connect from web client side to this server part and get any data stream
Back to Top
Bruno Fierens View Drop Down
TMS Support
TMS Support
Avatar

Joined: 11 May 2010
Posts: 7960
Post Options Post Options   Quote Bruno Fierens Quote  Post ReplyReply Direct Link To This Post Posted: 28 Aug 2018 at 3:58pm
You mentioned : "load text file" and then a HTTPS GET is most simple and you need a HTTPS server for that.
Alternative could be via a HTTP REST API if you need load/save (you did not mention 'save' though)
or alternatively a websocket server.

There are samples for HTTP GET, XDATA REST API server and WebSocket connection all included in the TMS WEB Core distribution.
Back to Top
Alex Egorov View Drop Down
New Member
New Member
Avatar

Joined: 04 May 2017
Posts: 9
Post Options Post Options   Quote Alex Egorov Quote  Post ReplyReply Direct Link To This Post Posted: 04 Sep 2018 at 3:11pm
Ok, this is XDataWebClientDemo? Where is server for this demo?
Back to Top
Wagner R. Landgraf View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2392
Post Options Post Options   Quote Wagner R. Landgraf Quote  Post ReplyReply Direct Link To This Post Posted: 04 Sep 2018 at 8:50pm
The source code of server used in XDataWebClient demo is provided in XData installation, under demos folder, subfolder "simple_sqlite". But it provides data from a database, not from a test file.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down