#Tauri Upload Plugin Speed

8 messages · Page 1 of 1 (latest)

sterile marten
#

Just wondering, does this plugin have to upload the file to the rust backend first via IPC, or does it just upload directly to the destination server from the JS part?

`import { upload } from '@tauri-apps/plugin-upload'

upload(
'https://example.com/file-upload',
'./path/to/my/file.txt',
(progress, total) => console.log(Uploaded ${progress} of ${total} bytes), // a callback that will be called with the upload progress
{ 'Content-Type': 'text/plain' } // optional headers to send with the request
)`

sterile marten
#

I'm asking because in v1, I know the IPC was very slow for moving files from the frontend to the backend. But now in v2 i'm wondering does it still just increase time instead of uploading directly from the frontend?

woven fiber
#

the js part is only for updating the frontend in the uploader afaik (if you pass a file name it will be handled in rust)

sterile marten
woven fiber
#

?

#

it does not take file content from the frontend afaik

#

you can specify a path from the filesystem to upload

#

and then it posts it somewhere