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: add example for streaming data with Content-Disposition #11545

Merged
merged 2 commits into from
Jan 29, 2025

Conversation

ChaimaaeROUAI
Copy link
Contributor

In this issue #9480 , it seems that there is some confusion around how to stream data (like CSV) while forcing a file download via Content-Disposition.

return HttpResponse.ok(data)
.header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"data.csv\"")
.contentType(MediaType.TEXT_PLAIN_TYPE);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

could you move this to a source file that compiles that preferably has a test and use the snippet:: macro to include with examples for Java, Kotlin and Groovy. Thanks.

@sdelamo sdelamo merged commit 8551b10 into 4.8.x Jan 29, 2025
22 checks passed
@sdelamo sdelamo deleted the issue-9480-docs branch January 29, 2025 12:11
sdelamo pushed a commit that referenced this pull request Jan 31, 2025
* docs: add reactive file download example

* Add example code snippets (Java, Kotlin, Groovy) with snippet macros
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants