-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
I am having a hard time trying to return binary data from one of my routes. My use case is that when a /download route is called, I need to return a file that depends on the caller profile and context.
I cannot use tower_http::services::ServeDir because in my case the file is selected dynamically. In addition, it could be served from the filesystem or from a database.
Would it be possible to include an example that shows how to:
- return a file from the filesystem or generic binary data
- set the response ContentDisposition/DispositionParameters/DispositionType
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels