Skip to content

Commit

Permalink
return content_length for aliyun_drive after writing
Browse files Browse the repository at this point in the history
  • Loading branch information
meteorgan committed Feb 5, 2025
1 parent 8af4e13 commit a930b17
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/src/services/aliyun_drive/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,11 @@ impl oio::Write for AliyunDriveWriter {
async fn close(&mut self) -> Result<Metadata> {
let (Some(upload_id), Some(file_id)) = (self.upload_id.as_ref(), self.file_id.as_ref())
else {
return Ok(Metadata::default());
return Ok(Metadata::default().with_content_length(self.write_bytes_count));
};

self.core.complete(file_id, upload_id).await?;
Ok(Metadata::default())
Ok(Metadata::default().with_content_length(self.write_bytes_count))
}

async fn abort(&mut self) -> Result<()> {
Expand Down

0 comments on commit a930b17

Please sign in to comment.