58

I want to attach some files to a post on one of Stack Exchange sites. What is the best way to do this?

2

4 Answers 4

31

Use a file upload service like SkyDrive and post the link on the page like so:

<a href="http://file">file</a>
4
  • 1
    I have problems with skydrive links, some users complain they can't download them. Their browser sees the skydrive URL ending in.zip and tries to download the HTML and save it as a zip. Apr 20, 2011 at 15:41
  • 1
    Good file hosting sites include Dropbox, Google Drive, OneDrive and Mediafire
    – Stevoisiak
    Jul 20, 2017 at 18:15
  • And github gists Aug 10, 2018 at 9:44
  • @StevenVascellaro It's odd. I don't consider a single one of those to bee a good filehosting site. All to often I encounter dead links after a couple of years.
    – Daniel F
    Oct 8, 2018 at 9:28
13

Host them somewhere else and post a link. StackOverflow does not provide file hosting services.

4
  • 1
    ...and there's a reason for that! Apr 23, 2010 at 21:37
  • 5
    @GeorgeEdison ... And what is the reason?
    – Mukul Goel
    Nov 5, 2012 at 8:24
  • 1
    because that can get expensive and abused. They do now though, but only 1 image file up to 2mb. Drag and drop, baby! Feb 14, 2017 at 21:51
  • drag'n drop of non-image files does not work, at least not in FF 56 Dec 18, 2018 at 11:03
6

LaTeX is just code, so if you have a question about how to do something in LaTeX, just include a snippet like you would any other piece of code.

(Hint: indent it by four spaces, or select it and click the 'binary' icon in the toolbar of the edit window.)

0
1

I'd recommend using Pastebin for this scenario

PS: Seems that people didn't notice that the requester was asking to include LaTeX files, which are markup based ones, thus they are plain text files!

7
  • 3
    Not relevant. Pastebin is only for text, while the question here is about files. Anyone can post text as part of the question/answer itself. Jul 19, 2017 at 19:49
  • 1
    @ShadowWizard Latex files are simple text files, that's why I suggested PasteBin! Jul 20, 2017 at 1:05
  • 2
    How is this answer different from: meta.stackexchange.com/a/47690/158100 or the accepted answer?
    – rene
    Jul 20, 2017 at 17:08
  • 1
    @rene there are huge differences from my point of view: from the link a snippet would be useful only if it's not long, as the question body has a character limit, which I've overcome before using PasteBin and, from the accepted answered both solved the problem, but in different ways as a link to a file to download, is not a link to a site where you can actually see the file contents, maybe subtle, but the are different indeed. Jul 20, 2017 at 17:30
  • 1
    Ok, I've gone the extra mile. I must be missing something. I have pastebinned a LaTeX snippet that I found on GitHub. What makes PasteBin now so much different then GitHub, SkyDrive, DropBox or even a gist. So if PasteBin is so much preferable above all other filesharing options what is the extra feature that I fail to see? For a moment I thought they implemented a latex renderer or is that only available in the pro version of it?
    – rene
    Jul 20, 2017 at 18:47
  • @rene I guess from your comment that Gist is even more adequate than PasteBin for this purpose, as it's "code" related and, not just text. As PasteBin and Gist post can be done anonymously, makes them waste no space from your prefered file sharing provider (DropBox, Google Drive, etc), and makes posts discardable. Maybe it's just a subjective perspective, but makes it cleaner for me Jul 20, 2017 at 19:30
  • @GonzaloVasquez; pastebin has a size limit of 500KB for the free account. May 14, 2019 at 14:25

You must log in to answer this question.

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