Page 1 of 1

File Transfer Linux / Mobile

Posted: Wed Sep 23, 2015 11:53 am
by Kevvy
Hi Guys,

I wrote an agent to serve an app that runs on a mobile device in it's own network. This agent runs on a linux box and has connectivity to a remote server. Now I need to transfer files from the local linux agent which was created on the mobile app, to our remote server. I have tried all the different flavours of getting FTP to work on linux to no avail (libURLftpUploadFile / libURLftpCommand) or even the one where you post it to an ftp url. I am also wary using FTP for transferring these files and would rather have some sort of web service doing the deed over SSL.

The Linux server is running a headless CentOS version so debugging is difficult..

Long story short - how do you guys handle file transfers from one server to another seeing that web service support is quite dismal ?

I would appreciate any recommendations you might have in this regard.

Regards,
Kev

Re: File Transfer Linux / Mobile

Posted: Wed Sep 23, 2015 5:02 pm
by FourthWorld
"web service support is quite dismal"? How so?

Are you even using a web service there? Your post mentions only FTP.

If you manage both servers you can share an SSH key from one to the other and use rsync, which will be simpler and much more efficient than either FTP or HTTP.

If that's not an option we can explore setting up a CGI under Apache on the receiver for a more secure and efficient alternative to FTP.

But try rsync first. It's by far better where all you need is file transfer between two machines you manage.

Re: File Transfer Linux / Mobile

Posted: Fri Sep 25, 2015 6:13 am
by Kevvy
Thanks for the response. Using webservices in livecode requires quite a bit of "manual" intervention in terms of building the xml parser etc, it could have been a lot more intuitive if you compare it to other language IDE's. As far as I know as well I can only read a response after posting to a webserver running the client code instead of it doing the request at the engine level ? - I might be wrong here though so if there is any other way please let me know :)

I will have a look at RSYNC thanks for mentioning it!

Regards
Kev

Re: File Transfer Linux / Mobile

Posted: Fri Sep 25, 2015 6:26 am
by FourthWorld
The XML commands and functions included in the package are fairly extensive. What did you need to write that wasn't included?