diff --git a/README.md b/README.md index 303819e0..fc505b98 100644 --- a/README.md +++ b/README.md @@ -219,7 +219,7 @@ The complete API Reference is available here: #### File Object Operations -- [fput-object.js](https://github.com/minio/minio-js/blob/master/examples/fput-object.js) +- [fput-object.mjs](https://github.com/minio/minio-js/blob/master/examples/fput-object.js) - [fget-object.mjs](https://github.com/minio/minio-js/blob/master/examples/fget-object.mjs) #### Object Operations diff --git a/README_zh_CN.md b/README_zh_CN.md index fac0b193..500dbc24 100644 --- a/README_zh_CN.md +++ b/README_zh_CN.md @@ -160,7 +160,7 @@ mc ls play/europetrip/ * [list-incomplete-uploads.js](https://github.com/minio/minio-js/blob/master/examples/list-incomplete-uploads.js) #### 完整示例 : 操作文件对象 -* [fput-object.js](https://github.com/minio/minio-js/blob/master/examples/fput-object.js) +* [fput-object.mjs](https://github.com/minio/minio-js/blob/master/examples/fput-object.js) * [fget-object.mjs](https://github.com/minio/minio-js/blob/master/examples/fget-object.mjs) #### 完整示例 : 操作对象 diff --git a/examples/fput-object.js b/examples/fput-object.mjs similarity index 100% rename from examples/fput-object.js rename to examples/fput-object.mjs diff --git a/src/internal/client.ts b/src/internal/client.ts index 71d090ee..8f18edac 100644 --- a/src/internal/client.ts +++ b/src/internal/client.ts @@ -1579,7 +1579,7 @@ export class TypedClient { // Inserts correct `content-type` attribute based on metaData and filePath metaData = insertContentType(metaData, filePath) const stat = await fsp.lstat(filePath) - await this.putObject(bucketName, objectName, fs.createReadStream(filePath), stat.size, metaData) + return await this.putObject(bucketName, objectName, fs.createReadStream(filePath), stat.size, metaData) } /**