I found the answer myself. For the http protocol, the destination Location had to be defined like this:
destinationLocation = "\\ebooks\\DIN.txt";
Does anybody know if this is an issue of RhoElements V184.108.40.206 or an issue of the documentation. When I use the meta tag syntax, the "file://" protocol prefix is important. The transfer in meta tags is as follows:
<META HTTP-Equiv="FileTransfer" Content="Destination:url('file://\Temp\DIN.txt')">
<META HTTP-Equiv="FileTransfer" Content="CreateFolders:True">
<META HTTP-Equiv="FileTransfer" Content="OverWrite:True">
<META HTTP-Equiv="FileTransfer" Content="Source:url('http://pc2012.ka.tup.com:8084/Test/RhoElements/xml/Config.xml')">
I'm looking for the right syntax for ftp protocol (transfer from server to handheld). Does anybody know the right syntax?
FTP syntax should be the same:
(username and password are optional, as long as your server allows anonymous ftp)
Are you getting an error when trying to use FTP ?
The upload (client to host) is successful with:
sourceLocation = 'file://\\ebooks\\DIN.txt';
but the download with:
destinationLocation = 'file://\\ebooks\\DIN.txt';
returns the error code 3 (with file:// prefix) respective error code 6 (without file:// prefix).
In my example I do first the upload and afterwards I try the download. After the download the existing file is deleted (because the option fileTransfer.overWrite='true' is specified). But the download is not performed.
You can simply use Aysnchttp api provided by RhoMobile.
You can find a File Download example at http://docs.rhomobile.com/rhodes/connect-to-web-services#asynchttp-download_file-ex.