store-s3-aws 1.3.13 → 1.3.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "store-s3-aws",
3
- "version": "1.3.13",
3
+ "version": "1.3.14",
4
4
  "description": "Lib to store files in AWS S3",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/AwsS3Store.js CHANGED
@@ -84,6 +84,8 @@ class AwsS3Store {
84
84
  Bucket: this.bucketName,
85
85
  Key: remoteFilePath
86
86
  };
87
+ const dir = path.dirname(options.path);
88
+ await fs.promises.mkdir(dir, { recursive: true });
87
89
  const fileStream = fs.createWriteStream(options.path);
88
90
  const response = await this.#getClientS3().send(new GetObjectCommand(params));
89
91
  await new Promise((resolve, reject) => {