<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [web-tls](./web-tls.md) &gt; [downloadFile](./web-tls.downloadfile.md)

## downloadFile() function

下载文件

<b>Signature:</b>

```typescript
export declare function downloadFile(url: string, name?: string | null): void;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  url | string | 下载链接 |
|  name | string \| null | <i>(Optional)</i> 下载后保存成的文件时的文件名字 |

<b>Returns:</b>

void

