diff --git a/handler/htmx/artifact.go b/handler/htmx/artifact.go index 38163c40..1bcc976f 100644 --- a/handler/htmx/artifact.go +++ b/handler/htmx/artifact.go @@ -139,7 +139,7 @@ func RecordReadmeCopier(c echo.Context, dirs command.Dirs) error { return badRequest(c, err) } unid := c.Param("unid") - tmp, err := helper.MkContent(unid + "-copier") + tmp, err := helper.MkContent(unid) if err != nil { return badRequest(c, err) } @@ -157,7 +157,9 @@ func RecordReadmeCopier(c echo.Context, dirs command.Dirs) error { } if !helper.File(filepath.Join(dirs.Thumbnail, unid+".png")) && !helper.File(filepath.Join(dirs.Thumbnail, unid+".webp")) { - return RecordReadmeImager(c, nil, false, dirs) + if err := dirs.TextImager(nil, src, unid, false); err != nil { + return badRequest(c, err) + } } c = pageRefresh(c) return c.String(http.StatusOK, diff --git a/handler/routerlock.go b/handler/routerlock.go index 357f1bf5..07a9debc 100644 --- a/handler/routerlock.go +++ b/handler/routerlock.go @@ -214,6 +214,7 @@ func editor(g *echo.Group, db *sql.DB, logger *zap.SugaredLogger, dir app.Dirs) Download: dir.Download, Preview: dir.Preview, Thumbnail: dir.Thumbnail, + Extra: dir.Extra, } readme := g.Group("/readme") readme.PATCH("/copy/:unid/:path", func(c echo.Context) error {