Network
my.downloadFile
Download a file from a remote server.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Download a file from a remote server.
| Property | Type | Required | Description |
|---|---|---|---|
| url | String | Yes | File URL to download |
| header | Object | No | Request headers |
| success | Function | No | Callback on success |
| fail | Function | No | Callback on failure |
| complete | Function | No | Callback that always executes |
| Property | Type | Description |
|---|---|---|
| apFilePath | String | Temporary file storage location |
| Error | Description |
|---|---|
| 12 | Downloading failed |
| 13 | No right |
my.downloadFile({
url: 'https://example.com/file.pdf',
success: (res) => {
console.log('Downloaded to:', res.apFilePath);
}
});