diff --git a/src/main/java/com/aliyun/oss/internal/OSSObjectOperation.java b/src/main/java/com/aliyun/oss/internal/OSSObjectOperation.java index 33dcac54..fef31a2b 100644 --- a/src/main/java/com/aliyun/oss/internal/OSSObjectOperation.java +++ b/src/main/java/com/aliyun/oss/internal/OSSObjectOperation.java @@ -786,6 +786,7 @@ private ResponseType writeO } try { + metadata.setContentLength((long) originalInputStream.available()); repeatableInputStream = newRepeatableInputStream(originalInputStream); } catch (IOException ex) { logException("Cannot wrap to repeatable input stream: ", ex);