Skip to content

Commit

Permalink
fix: 解决下载图片打不开的问题
Browse files Browse the repository at this point in the history
closed #27
  • Loading branch information
tu6ge committed Oct 26, 2023
1 parent 075f55e commit 5f0dcf9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,10 @@ where
.builder_with_header(Method::GET, url, canonicalized, list)?
.send_adjust_error()
.await?
.text()
.bytes()
.await?;

Ok(content.into_bytes())
Ok(content.to_vec())
}

/// # 从 OSS 中删除文件
Expand Down Expand Up @@ -530,10 +530,10 @@ where
.builder_with_header(Method::GET, url, canonicalized, list)?
.send_adjust_error()
.await?
.text()
.bytes()
.await?;

Ok(content.into_bytes())
Ok(content.to_vec())
}

/// # 删除 OSS 上的文件
Expand Down Expand Up @@ -901,8 +901,8 @@ pub mod blocking {
Ok(self
.builder_with_header(Method::GET, url, canonicalized, headers)?
.send_adjust_error()?
.text()?
.into_bytes())
.bytes()?
.to_vec())
}

/// # 删除 OSS 上的文件
Expand Down

0 comments on commit 5f0dcf9

Please sign in to comment.