(c echo.Context, file io.ReadSeeker, app storage.App)
| 572 | } |
| 573 | |
| 574 | func writeFileResponse(c echo.Context, file io.ReadSeeker, app storage.App) error { |
| 575 | name, err := app.GetString(storage.AppName) |
| 576 | if err != nil { |
| 577 | return err |
| 578 | } |
| 579 | //TODO: Should use the file's mod time, otherwise may tell client to use cached file even though it has changed |
| 580 | modTime, err := app.GetModTime() |
| 581 | if err != nil { |
| 582 | return err |
| 583 | } |
| 584 | c.Response().Header().Add("Content-Disposition", fmt.Sprintf(`attachment; filename="%s"`, name)) |
| 585 | http.ServeContent(c.Response(), c.Request(), name, modTime, file) |
| 586 | return nil |
| 587 | } |
| 588 | |
| 589 | func uploadUnsignedApp(c echo.Context) error { |
| 590 | profileId := c.FormValue(formNames.FormProfileId) |
no test coverage detected