@@ -66,15 +66,15 @@ import { upload, HttpMethod } from '@tauri-apps/plugin-upload'
6666upload (
6767 ' https://example.com/file-upload' ,
6868 ' ./path/to/my/file.txt' ,
69- (progress , total ) => console .log (` Uploaded ${ progress } of ${ total} bytes` ), // a callback that will be called with the upload progress
69+ (progressTotal , total ) => console .log (` Uploaded ${ progressTotal } of ${ total} bytes` ), // a callback that will be called with the upload progress
7070 { ' Content-Type' : ' text/plain' } // optional headers to send with the request
7171)
7272
7373// Upload with specific HTTP method
7474upload (
7575 ' https://example.com/file-upload' ,
7676 ' ./path/to/my/file.txt' ,
77- (progress , total ) => console .log (` Uploaded ${ progress } of ${ total} bytes` ),
77+ (progressTotal , total ) => console .log (` Uploaded ${ progressTotal } of ${ total} bytes` ),
7878 { ' Content-Type' : ' text/plain' },
7979 HttpMethod .Put // Use HttpMethod enum - supports POST, PUT, PATCH
8080)
@@ -86,7 +86,7 @@ import { download } from '@tauri-apps/plugin-upload'
8686download (
8787 ' https://example.com/file-download-link' ,
8888 ' ./path/to/save/my/file.txt' ,
89- (progress , total ) => console .log (` Downloaded ${ progress } of ${ total} bytes` ), // a callback that will be called with the download progress
89+ (progressTotal , total ) => console .log (` Downloaded ${ progressTotal } of ${ total} bytes` ), // a callback that will be called with the download progress
9090 { ' Content-Type' : ' text/plain' } // optional headers to send with the request
9191)
9292```
0 commit comments