Silverstripe 3 file upload error JSON unexpected character

If you get a Silverstripe 3 upload error (SyntaxError: JSON.parse: unexpected character) The the solution is simple. Make sure your assets folder is writable by the web server. Set the correct permissions and then all should be working.

Another problem caused by incorrect permissions when setting your site "live" from "dev" is that the admin page will not load, and you will just be presented with the Silverstripe splashscreen. This is also caused by an unwriteable cache folder in the assets folder.