We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent da59a11 commit b151b68Copy full SHA for b151b68
src/internal/client.ts
@@ -1658,7 +1658,7 @@ export class TypedClient {
1658
}
1659
1660
const partSize = this.calculatePartSize(size)
1661
- if (typeof stream === 'string' || Buffer.isBuffer(stream) || size <= partSize) {
+ if (typeof stream === 'string' || stream.readableLength === 0 || Buffer.isBuffer(stream) || size <= partSize) {
1662
const buf = isReadableStream(stream) ? await readAsBuffer(stream) : Buffer.from(stream)
1663
return this.uploadBuffer(bucketName, objectName, headers, buf)
1664
0 commit comments