20

I went to post a solution to a problem. The solution includes a large .bst file that is 32K on its own. So I was unable to actually post that file as part of my response. Of course I can put the file online somewhere and give a link to it, but that seems like it's much less stable, and likely to break in the future. I can post a diff, but that may be harder for other people to use.

What is the recommended way to include large files that are necessary for an answer?

Please feel free to retag this, I am not sure what the best tags are.

  • I also wondered about how to do that as I wanted to add a binary file to an answer which contains an editable solution. I followed the discussion here to meta.SO meta.stackexchange.com/q/70043/144964, but I did not find a solution or answer. :-( – MostlyHarmless May 27 '11 at 0:52
12

I think the best solution might well be a StackExchange branded "pastebin" type facility. Several other SE sites would also benefit from the possibility of dumping log files and the like somewhere and then linking to it. So how about we bring it in-house?

I have asked about this on meta.SO, as the comment suggested.

  • 2
    That would be the best solution indeed. Should we ask for it on meta.SO? – mpg Nov 9 '10 at 17:59
  • Is that the best place to do it? I think we need a stack exchange-wide meta discussion... – Seamus Nov 9 '10 at 21:55
11

There's already something matching what you're looking for: Github Gist.

  • They are already oneboxed in chat.
  • They make a real git repository for each post.
  • They allow editing posts (which translates to a git commit behind the scenes).
  • They allow anonymous posting.
  • They do syntax highlighting.
  • They allow multiple files.
  • They allow comments with Markdown syntax.

Here's a complex example.

  • Not sure who “the team” is but this sounds like the technically most solid and future-proof solution. – Konrad Rudolph Nov 12 '10 at 13:01
  • @Konrad The StackExchange chat team at the very least :) – badp Nov 12 '10 at 13:03
  • Good to know that there's a de facto standard at least. – Matthew Leingang Nov 19 '10 at 13:36
1

A similar question on meta.stackexchange suggests using pastbin, rapidshare or similar sites for sharing. (upload the file and then post the link in the question.) I see no reason we could should behave differently.

This of course runs the risk that sometime in the future that hosting company will be defunct...there doesn't seem to be much we can do about that..

  • 6
    Using pastebin seems like the worst option: these sites can delete old posts at any moment and aren't accountable to us in any way. – Carl Mummert Nov 7 '10 at 0:04
1

I think you've already outlined all your options. Since you can't post it here, you have to post it somewhere else. If you are concerned about persistence, either host it on your own website or host it somewhere else and use a purl.org URL to change its location if you need to.

I like your diff/patch idea as well. It would be polite to give specific advice on how to use it. The Wikipedia page for patch or man page for patch might be good resources.

So do both!

1

It's very simple to post a public link to a Dropbox item (put in the Public folder and -- on a Mac at least -- control-click to get a pastable link).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .