From fad9c0fe78155fe7452bc44a5f9b996e19584283 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?O=CC=81scar=20M=2E=20Lage?= Date: Thu, 5 Dec 2024 14:46:32 +0100 Subject: [PATCH] Add: comment to clarify the DELETION --- internal/web/controller.go | 2 ++ 1 file changed, 2 insertions(+) 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)