mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-06-06 13:53:54 +02:00
feat: update to tauri beta.24 (#1537)
* feat: update to tauri beta.24 * remove .tauri * pnpm build
This commit is contained in:
committed by
GitHub
parent
9973f8ee83
commit
22a17980ff
@@ -24,6 +24,6 @@
|
||||
"LICENSE"
|
||||
],
|
||||
"dependencies": {
|
||||
"@tauri-apps/api": "2.0.0-beta.14"
|
||||
"@tauri-apps/api": "2.0.0-beta.15"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ async fn download(
|
||||
url: &str,
|
||||
file_path: &str,
|
||||
headers: HashMap<String, String>,
|
||||
on_progress: Channel,
|
||||
on_progress: Channel<ProgressPayload>,
|
||||
) -> Result<()> {
|
||||
let client = reqwest::Client::new();
|
||||
|
||||
@@ -84,7 +84,7 @@ async fn download(
|
||||
|
||||
while let Some(chunk) = stream.try_next().await? {
|
||||
file.write_all(&chunk).await?;
|
||||
let _ = on_progress.send(&ProgressPayload {
|
||||
let _ = on_progress.send(ProgressPayload {
|
||||
progress: chunk.len() as u64,
|
||||
total,
|
||||
});
|
||||
@@ -99,7 +99,7 @@ async fn upload(
|
||||
url: &str,
|
||||
file_path: &str,
|
||||
headers: HashMap<String, String>,
|
||||
on_progress: Channel,
|
||||
on_progress: Channel<ProgressPayload>,
|
||||
) -> Result<String> {
|
||||
// Read the file
|
||||
let file = File::open(file_path).await?;
|
||||
@@ -129,7 +129,7 @@ async fn upload(
|
||||
}
|
||||
}
|
||||
|
||||
fn file_to_body(channel: Channel, file: File) -> reqwest::Body {
|
||||
fn file_to_body(channel: Channel<ProgressPayload>, file: File) -> reqwest::Body {
|
||||
let stream = FramedRead::new(file, BytesCodec::new()).map_ok(|r| r.freeze());
|
||||
|
||||
reqwest::Body::wrap_stream(ReadProgressStream::new(
|
||||
|
||||
Reference in New Issue
Block a user