File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/content/docs/zh-cn/plugin Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,8 @@ import { upload } from '@tauri-apps/plugin-upload';
79
79
upload (
80
80
' https://example.com/file-upload' ,
81
81
' ./path/to/my/file.txt' ,
82
- (progress , total ) => console .log (` Uploaded ${ progress} of ${ total} bytes` ), // 上传进度时调用的回调函数
82
+ ({ progress, total }) =>
83
+ console .log (` Uploaded ${ progress} of ${ total} bytes` ), // 上传进度时调用的回调函数
83
84
{ ' Content-Type' : ' text/plain' } // 与请求一起发送的可选头信息
84
85
);
85
86
```
@@ -90,7 +91,8 @@ import { download } from '@tauri-apps/plugin-upload';
90
91
download (
91
92
' https://example.com/file-download-link' ,
92
93
' ./path/to/save/my/file.txt' ,
93
- (progress , total ) => console .log (` Downloaded ${ progress} of ${ total} bytes` ), // 下载进度时调用的回调函数
94
+ ({ progress, total }) =>
95
+ console .log (` Downloaded ${ progress} of ${ total} bytes` ), // 下载进度时调用的回调函数
94
96
{ ' Content-Type' : ' text/plain' } // 与请求一起发送的可选头信息
95
97
);
96
98
```
You can’t perform that action at this time.
0 commit comments