Skip to content

How to return files over output? #772

@stargeneration-winston

Description

@stargeneration-winston

In echo, I usually do this:

c.Response().Header().Set("Content-Type", "application/pdf")
if err := generatePDFInvoice(c.Request().Context(), params, c.Response().Writer); err != nil {
  return err
}

return nil

How do I respond with files in body in Huma? The docs do not have such an example

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions