Commonly used for FTP retrieval, [curl->download] retrieves a file from the remote server and places it in the specified location.
Accepts either a string specifying the destination location of the downloaded file, or the -asBytes keyword which will return the contents of the downloaded file as bytes data for serving or other additional processing as required.
* This functionality was introduced in Lasso 9.2.6
Use the [curl->download] method to retrieve the file and save it in the web server's local directory.
The destination server and path name of the source file are specified in the initialization of the curl object, as well as the username and password authentication.
local(c = curl( 'ftp://server.com/path/to/file.txt', -username='my_username', -password='my_password' ) ) #c->download('/download/filedownloaded.txt')
The file is saved to disk at /download/filedownloaded.txt
Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.