Skip to content

Commit bead3fc

Browse files
authored
Update progress callback parameter names in README
1 parent c463d8a commit bead3fc

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

plugins/upload/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,15 @@ import { upload, HttpMethod } from '@tauri-apps/plugin-upload'
6666
upload(
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
7474
upload(
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'
8686
download(
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

Comments
 (0)