I'm developing a website using beego
I'm having a zip file generated to let user download from my website. However,I don't know when to delete the file. Is there a way for me to know if user have finished download the zip file, so I could delete it from disk?
Or, Can I generate zip file on-the-fly and past the *zip.File to net/http?
I see http.ServeFile()
accept a ReadSeeker, yet I think zip.File don't satisfy ReadSeeker
interface according to the doc.
Is there a good way to do file delete on my situation?