Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Body.transformToString を使い streamToString の利用を止める #146

Open
dynamis opened this issue Feb 7, 2024 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@dynamis
Copy link
Contributor

dynamis commented Feb 7, 2024

2022 年末頃の JS SDK の変更で GetObjectCommand で得られる response.Body に transformToString メソッドが追加実装されており、String 型で簡単に受け取れるようになったらしいです。

最近まるっと新しく差し替わった最新のサンプルコード集でもそちらを使っています

https://github.com/awsdocs/aws-doc-sdk-examples/blob/94795e0ae7e6fc91a4dbf4972fc5048a4527b301/javascriptv3/example_code/s3/actions/get-object.js#L17-L24

ので streamToString を独自定義して利用するのは止めて transformToString にした方が良さそう:

https://github.com/webdino/lyceum-pokemon/blob/da0756e2d9d04f3bc87d2b3331a2041a798114fe/server/utils/trainer.js#L11C7-L17

@knokmki612 knokmki612 added the enhancement New feature or request label Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants