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

docs(streams): adds docs for streaming files with StreamableFiles #1700

Merged
merged 2 commits into from
Feb 26, 2021

Conversation

jmcdo29
Copy link
Member

@jmcdo29 jmcdo29 commented Jan 28, 2021

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[X] Docs
[ ] Other... Please describe:

What is the current behavior?

Issue Number: N/A
There's no documentation for a new feature being implemented (nest#5278)

What is the new behavior?

There's now docs showing how files can be streamed back without interfering with the interceptor's post-controller logic.

Does this PR introduce a breaking change?

[ ] Yes
[X] No

Other information

Looks like some of the compiled output from degni got modified. Let me know if you want me to remove that or keep it. Looks like it shouldn't modify the final output to the webpage

@@ -0,0 +1,41 @@
### Streaming Files

There won't always be a time where you're sending back JSON or string responses. There may be times where you'd like to send back a file from the server to the client. In an express application, you may use something like
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
There won't always be a time where you're sending back JSON or string responses. There may be times where you'd like to send back a file from the server to the client. In an express application, you may use something like
There won't always be a time where you're sending back JSON or string responses. There may be times where you'd like to send back a file from the server to the client. In an express application, you may use something like

Maybe instead of showing an express example here, we could present how it could be accomplished using the standard, Response object (saying it's pretty much the same way as in native express/fastify application). The reason is that we're slowly getting more and more users that are not even familiar with express itself

@kamilmysliwiec kamilmysliwiec added this to the 8.0.0 milestone Feb 25, 2021
@kamilmysliwiec kamilmysliwiec changed the base branch from master to 8.0.0 February 26, 2021 13:07
@kamilmysliwiec kamilmysliwiec merged commit 52f8c45 into nestjs:8.0.0 Feb 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants