diff --git a/internal/web/controller.go b/internal/web/controller.go index 0145096..7a03bbc 100644 --- a/internal/web/controller.go +++ b/internal/web/controller.go @@ -54,6 +54,8 @@ func handleUpload(w http.ResponseWriter, r *http.Request) { commandCounts, categories, pipeRedirectionCounts, commonPatterns := ProcessHistory(tempFile.Name()) + // THE UPLOAD FILE IS INMEDIATELY REMOVED + // ONCE THE STATS ARE GENERATED err = os.Remove(tempFile.Name()) if err != nil { http.Error(w, "Error deleting temporary file", http.StatusInternalServerError)