[curl->upload] will upload a file to the specified remote server.
Accepts one parameter which can be either a string, a file object, or a bytes type.
If the parameter is a string, it is expected to be the path to the file to be uplaoded. This can be either relative to the current file being executed or absolute from the web server root.
Note that the curl object is initialized with the servername and path to the desired location of the file to be uploaded.
* This functionality was introduced in Lasso 9.2.6
curl->upload('/path/to/file/filetoupload.txt') curl->upload(file('/path/to/file/filetoupload.txt')) curl->upload(bytes)
Use the [curl->upload] method.
The destination server and path name of the destination file are specified in the initialization of the curl object, as well as the username and password authentication.
This example passes to the upload method the path to a file as a string.
local(c = curl( 'ftp://server.com/path/to/file.txt', -username='my_username', -password='my_password' ) ) #c->upload('/path/to/file/filetoupload.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.