I've seen users posts and refer content on "external" sites.
Where should I upload mine, and where should I not upload mine, and why?
Note that this question serves more of a reminder than anything else.
Think in terms of future visitor experience: favour content in the post rather than an external link, and favour stable external sites rather than rot prone ones.
Images should be uploaded to StackExchange's imgur server, using the Image <img> Ctrl+G icon in the edit bar of every Question and Answer post. They'll end up with an URL starting with https://i.stack.imgur.com.
Code should be posted right in the question/answer, and formatted using the Preformated text <pre> <code> Ctrl-K icon in the edit bar of every Question and Answer post. There are many reasons why code should not be posted as an image / screenshot.
Videos should be converted as much as possible to animated gifs and uploaded to StackExchange's imgur server, as described before. If not, YouTube links tend to not rot that much.
Whole projects should not be needed. If you think you need to upload a project, you probably should re-scope your question or your answer. If you must upload it somewhere, favour "open source" repositories such as github¤. And when linking to the project, browse the history of the project and link to a specific commit instead of linking to the 'head' of the master branch. This way the question and the project will make sense for future visitors (you'll most likely keep on working on your project, which will render the 'head' irrelevant to the StackExchange post).
This being said, it's important to not rely on less stable external resources. There has been stories in the past that made some questions and answers completely irrelevant because they relied on resources that were no longer there, and no longer available.
So here is a (incomplete) list of sites that should be avoided mainly because of a high risk of link rot:
¤ I have not yet encountered an occurrence of a rot there.
¤¤ From what I understand of the service. Has to be confirmed.