URLStatus | |||||||
Type | function | ||||||
Dictionary | LCS | ||||||
Library | LiveCode Script | ||||||
Syntax |
| ||||||
Associations | internet library | ||||||
Summary | Returns the status of uploads and downloads that were started with the load, libURLDownloadToFile, libURLftpUpload, and libURLftpUploadFile commands. | ||||||
Introduced | 1.0 | ||||||
Changes | The URLStatus function became part of the Internet library in version 1.1. In previous versions, it was not a library function. | ||||||
OS | mac, windows, linux, web | ||||||
Platforms | desktop, server | ||||||
Parameters |
| ||||||
Example |
| ||||||
Values |
| ||||||
Related | Keyword: URL Glossary: FTP, return, standalone application, cache, command, callback, Standalone Application Settings, upload, download, message, server, handler, LiveCode custom library Command: post, libURLftpUploadFile, libURLftpUpload, libURLDownloadToFile, load, libURLSetStatusCallback Function: libURLLastRHHeaders, libURLErrorData, URLStatus, cachedURLs Library: Internet library Control Structure: function | ||||||
Security | network | ||||||
Description | Use the URLStatus function to check the progress of an upload or download. You can check the cachedURLs function to determine whether a URL has already been downloaded. The URL is not placed in the cachedURLs until the download is complete, however, so you must use the URLStatus function to check a pending download or one that has been started but not finished.
The third item (bytesTotal) in the "loading" or "uploading" status report is empty if it is not possible to determine the total file size. (For example, if an FTP server does not support the SIZE command, it's not possible to determine the file size when downloading a file from that server.) If an error occurs during downloading, the URLStatus function returns "error". You can get the error message using the libURLErrorData function.
| ||||||
Tags | networking |