I've recently observed that a user frequently includes links to a zip file on a file sharing website in their answers. My gut tells me that this behavior should be discouraged, mainly because referring to zip files on an external file sharing website is prone to link rot and malware infections. In a certain sense, these are similar to jsfiddle links. A significant difference is that the external code (zip) runs directly on the reader's computer instead of a sandbox (the browser) though.
Is it OK to share files with Dropbox and other file-sharing services in posts? asks a similar question, but the answer mainly focuses on posts that are incomplete without the zip file, while the answers of the user in this question are already complete without the zip files.
I suggested to remove the zip files from his answers by mail (included below with his permission), where it became apparent that there is no document that states the (official) policy for linking to zip files from answers on Stack Overflow. So, what is our policy on linking to zip files on external file sharing websites?
My mail:
I've seen some of your recent answers on Stack Overflow and noticed that you frequently include a link to a zip file on an external file hosting site. This behavior is frowned upon on Stack Overflow [1] because there is potential for link rot and malware. Your answers are already complete without them (excellent!), so it would be nice if you go over your recent answers and remove the link to these zip files.
Reply to me:
They are meant to help people understand the answer itself Lots of users always get stuck in coding even if my answers are right and keep asking for help in the comments, so giving them a working example is the fastest and better way to solve their problems. I'm not violating any policy of the site doing it; the answer you linked is only opinion based. Link me an official SO policy page saying that external hosted files are not allowed and I'll remove them immediately.
Second reply from me:
Posts (questions and answers) ought to be self-contained. If the asker cannot understand the answer without the contents of the zip file, then you need to move the relevant parts of the zip file into your answer. Moreover, these links can expire (or the file sharing websites could be blocked by firewalls). which makes them useless for other/future readers. When your answer is already useful in itself, then there is no need for the zip file any more, since readers can copy-paste the relevant snippets from your answer into their code.
Second reply to me:
I believe you are right, yes, but I always include all the relevant code in my answers (you can see it), however users usually don't get it right and continue asking questions in comments until I give up on answering on that comments and link them a working example (which usually solves the discussion). Given that, I started adding .zip files to answers about Chrome Extensions at the first step to prevent these comment-discussions.
manifest.json
andmanifest.json.exe
.)