From 12d53dd098a8cf0432df5f2534b20279363e05cc Mon Sep 17 00:00:00 2001 From: Bernhard B Date: Thu, 13 Aug 2020 19:16:59 +0200 Subject: [PATCH] Remove temporary files also on success * Up to now, the temporary files on the filesystem were only removed when an error occured - resulting in an ever growing docker container. This changeset makes sure that the temporary files also get removed on success. see #26 --- src/api/api.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/api/api.go b/src/api/api.go index 16ce8a5..078a0d7 100644 --- a/src/api/api.go +++ b/src/api/api.go @@ -168,6 +168,8 @@ func send(c *gin.Context, attachmentTmpDir string, signalCliConfig string, numbe c.JSON(400, gin.H{"error": err.Error()}) return } + + cleanupTmpFiles(attachmentTmpPaths) c.JSON(201, nil) }