libURLftpUpload | |||||||||||||
Type | command | ||||||||||||
Dictionary | LCS | ||||||||||||
Library | LiveCode Script | ||||||||||||
Syntax |
| ||||||||||||
Associations | internet library | ||||||||||||
Summary | |||||||||||||
Introduced | 1.1.1 | ||||||||||||
OS | mac, windows, linux | ||||||||||||
Platforms | desktop, server | ||||||||||||
Parameters |
| ||||||||||||
Example |
| ||||||||||||
Related | Property: script Message: startup, openBackground, preOpenStack, openStack, preOpenCard Library: Internet library, library Keyword: URL, ftp, file, binfile Control Structure: function Function: URLStatus Command: libURLSetStatusCallback, unload, put, load, libURLSetFTPStopTime, libURLftpUploadFile, wait, group, libURLSetFTPMode Glossary: object, LiveCode custom library, non-blocking, standalone application, application, handler, function, binary file, command, execute, URL, main stack, text file, Standalone Application Settings, server, upload, message, parameter, download | ||||||||||||
Security | network | ||||||||||||
Description | Use the libURLftpUpload command to put a file on a server. The libURLftpUpload command is non-blocking, so it does not stop the current handler while the upload is completed. The handler continues while the libURLftpUpload command uploads the URL in the background. You can monitor the upload by checking the URLStatus function periodically. To upload a URL while blocking other operations, use the put command instead. To upload a file, use the file URL type (for text files) or the binfile URL type (for binary files). Because referring to a file URL's contents loads the file into memory, if you are uploading a large file, make sure you have enough memory available. You can also use the libURLftpUploadFile command to upload a file. The callbackMessage is sent to the object whose script contains the libURLftpUpload command, after the upload is complete, so you can handle the callbackMessage to perform any tasks you want to delay until the URL has been uploaded. Two parameters are sent with the message : the URL and the URLStatus of the file.
The URLStatus function returns the status of the uploaded file. If you no longer need to monitor the file's status, use the unload command to remove it from the URLStatus function's listing.
| ||||||||||||
Tags | networking |