Open trivikr opened 7 months ago
No transformation for getObject(params).createReadStream()
import { S3 } from "aws-sdk"; import { Readable } from "stream"; const client = new S3({ region: "us-west-2" }); const response: Readable = client .getObject({ Bucket: "my-bucket", Key: "my-key" }) .createReadStream();
import { S3 } from "@aws-sdk/client-s3"; import { Readable } from "stream"; const client = new S3({ region: "us-west-2" }); const response: Readable = client .getObject({ Bucket: "my-bucket", Key: "my-key" }) .createReadStream();
This is an issue since createReadStream does not exist on getObject in v3.
createReadStream
import { S3 } from "aws-sdk"; import { Readable } from "stream"; const client = new S3({ region: "us-west-2" }); const response: Readable = (await client .getObject({ Bucket: "my-bucket", Key: "my-key" })) .Body;
aws-sdk-js-codemod: 1.3.6 - jscodeshift: 0.15.2 - recast: 0.23.4
https://github.com/RocketChat/Rocket.Chat/blob/3da6e14f97572c91073f12ed4ebdb1eb19d23016/apps/meteor/app/file-upload/ufs/AmazonS3/server.ts#L151
Self-service
Describe the bug
No transformation for getObject(params).createReadStream()
Steps to reproduce
Observed behavior
This is an issue since
createReadStream
does not exist on getObject in v3.Expected behavior
Environment
Additional context