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
This commit is contained in:
Bernhard B
2020-08-13 19:16:59 +02:00
parent d289b862d5
commit 12d53dd098

View File

@@ -168,6 +168,8 @@ func send(c *gin.Context, attachmentTmpDir string, signalCliConfig string, numbe
c.JSON(400, gin.H{"error": err.Error()}) c.JSON(400, gin.H{"error": err.Error()})
return return
} }
cleanupTmpFiles(attachmentTmpPaths)
c.JSON(201, nil) c.JSON(201, nil)
} }