file.go 298 B

1234567891011121314151617
  1. package v2
  2. import (
  3. "net/http"
  4. "github.com/labstack/echo/v4"
  5. )
  6. // Path: route/v2/file.go
  7. func (s *CasaOS) GetFileTest(ctx echo.Context) error {
  8. //http.ServeFile(w, r, r.URL.Path[1:])
  9. http.ServeFile(ctx.Response().Writer, ctx.Request(), "/DATA/test.img")
  10. return ctx.String(200, "pong")
  11. }