C++
ACDBCORE2D_PORT Acad::ErrorStatus getRemoteFile( const ACHAR * pszURL, AcString& strLocalFile, bool bIgnoreCache = false ) const;
Description
This method downloads the resource (file) identified by the URL pszURL to the local file pszLocalFile.
The bool argument bIgnoreCache determines whether the file should be downloaded even if it has already been transferred earlier in the session.
This method, if you implement it, should allow the user transparent access to files on remote servers on the Internet. The first argument, pszURL, is the URL of the file that the user would like to download, and the second argument is a string to hold the path to a file on the local host to which the remote resource is copied. The ErrorStatus enum in AutoCAD (acadstrc.h) has been expanded to include more than 50 new values to indicate the status of an Internet file transfer. Your method implementation should return one of these values once the download process has terminated. If your implementation maintains a list of files that have already been downloaded in the current or a previous session (a cache), it may be more efficient to avoid a duplicate transfer and make a copy of the locally available file instead. The caller can explicitly force a download by setting this third parameter to Adesk::kTrue, in which case the cache will be bypassed altogether.
Parameters
Parameters | Description |
---|---|
pszURL | Input URL |
strLocalFile | Output string that contains the local file name |
bIgnoreCache | Input bool indicating whether to download the file even if it has be cached earlier in the session |
Links
Previous Declaration
ACDBCORE2D_PORT Acad::ErrorStatus getRemoteFile(const ACHAR * pszURL, AcString& strLocalFile);
History
Release 2019
Functionality is no longer bound to the value of the SECURELOAD system variable, but is now bound to the value of the SECUREREMOTEACCESS system variable. When SECUREREMOTEACCESS is set to 1, the ability to access remote files is disabled.
Release 2018.1
When SECURELOAD is set to 1, the ability to access remote files is disabled.