feat: add header into resource response (#2120)

Update - add header for get resource
pull/2124/head
Jianwei Zhang 2 years ago committed by GitHub
parent 723c444910
commit c835231d32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -490,6 +490,7 @@ func (s *APIV1Service) streamResource(c echo.Context) error {
http.ServeContent(c.Response(), c.Request(), resource.Filename, time.Unix(resource.UpdatedTs, 0), bytes.NewReader(blob))
return nil
}
c.Response().Writer.Header().Set("Content-Disposition", fmt.Sprintf(`filename="%s"`, resource.Filename))
return c.Stream(http.StatusOK, resourceType, bytes.NewReader(blob))
}

Loading…
Cancel
Save