Definitelytyped: @types/minio getObject promise should return a readable stream

Created on 3 Jul 2020  路  6Comments  路  Source: DefinitelyTyped/DefinitelyTyped

  • [x] I tried using the @types/minio package and had problems.
  • [x] I tried using the latest stable version of tsc. https://www.npmjs.com/package/typescript
  • [x] I have a question that is inappropriate for StackOverflow. (Please ask any appropriate questions there).
  • [x] [Mention](https://github.com/blog/821-mention-somebody-they-re-notified) the authors (see Definitions by: in index.d.ts) so they can respond.

    • Authors: @barinbritva @castorw @loremaps @OutdatedVersion

The getObject and getPartialObject should probably return a NodeJS.ReadableStream stream instead of the base stream.Stream (https://github.com/minio/minio-js/blob/ffd3fdb831777553bafd11f07ed8e8f2624d7816/src/main/minio.js#L362).

Similarly, putObject should probably accept a NodeJS.WritableStream stream instead of a base stream.Stream.

All 6 comments

I'll check it out

@adrian-delgado, for putObject uses ReadableStream too, because file is read to pass its content to S3
putObject doc

@adrian-delgado, for putObject uses ReadableStream too, because file is read to pass its content to S3
putObject doc

ah yes that makes sense. Thanks for looking into it.

@adrian-delgado, the fix was merged. Please, check if everything is ok for you. If so, please, close the issue.
And thanks for your report!

@barinbritva Everything ok for me. thank you :)

Was this page helpful?
0 / 5 - 0 ratings