chore(ui): Remove original UI/API routes

This commit is contained in:
Richard Palethorpe
2025-03-31 22:10:04 +01:00
parent cafaa0e153
commit f70985362d
5 changed files with 79 additions and 82 deletions

View File

@@ -214,12 +214,14 @@ func (a *App) ImportAgent(pool *state.AgentPool) func(c *fiber.Ctx) error {
os.MkdirAll("./uploads", os.ModePerm)
// Safely save the file to prevent path traversal
destination := fmt.Sprintf("./uploads/%s", file.Filename)
if err := c.SaveFile(file, destination); err != nil {
// Handle error
return err
}
// Safely read the file
data, err := os.ReadFile(destination)
if err != nil {
return err