Skip to content

Use Readable instead of ReadStream in uploadV2#1577

Merged
filmaj merged 1 commit intoslackapi:mainfrom
redneb:uploadV2-Readable
Feb 1, 2023
Merged

Use Readable instead of ReadStream in uploadV2#1577
filmaj merged 1 commit intoslackapi:mainfrom
redneb:uploadV2-Readable

Conversation

@redneb
Copy link
Copy Markdown
Contributor

@redneb redneb commented Dec 29, 2022

Summary

The old upload method accepts a Readable for its file argument, but the new uploadV2 accepts a ReadStream. There is no reason to use ReadStream here: Readable is strictly more generic (it's a superclass of ReadStream) and the code actually does not use any functionality specific to ReadStream, it only uses methods and events from Readable. This will make the transition from upload to uploadV2 more easy.

Requirements (place an x in each [ ])

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Dec 29, 2022

CLA assistant check
All committers have signed the CLA.

@seratch seratch added semver:patch enhancement M-T: A feature request for new functionality pkg:web-api applies to `@slack/web-api` labels Dec 29, 2022
@seratch seratch added this to the web-api@6.8.1 milestone Dec 29, 2022
@seratch seratch requested review from seratch and zimeg January 31, 2023 00:48
@filmaj filmaj merged commit a4c530d into slackapi:main Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement M-T: A feature request for new functionality pkg:web-api applies to `@slack/web-api` semver:patch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants