How to send an attachment as a response from an IHP action in such a way that after the file is sent, it is deleted from the server.
import System.IO (appendFile)
instance Controller MyController where
action SendFileAction { myData } = do
appendFile "data.txt" myData
-- sendFile "data.txt" "text/plain"
-- delete "data.txt"