mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-10-12 22:47:08 +02:00
* fix(upload): Don't bail on unknown file length on download, fixes #297 * typo
This commit is contained in:
1 parent
7acf865ffb
commit
eb55671f27
2 files changed
+5
-3
No files matched your search
@@ -62,9 +62,7 @@ async fn download<R: Runtime>(
|
||||
}
|
||||
|
||||
let response = request.send().await?;
|
||||
let total = response.content_length().ok_or_else(|| {
|
||||
Error::ContentLength(format!("Failed to get content length from '{url}'"))
|
||||
})?;
|
||||
let total = response.content_length().unwrap_or(0);
|
||||
|
||||
let mut file = File::create(file_path).await?;
|
||||
let mut stream = response.bytes_stream();
|
||||
|
||||
Reference in new issue
Block a user