PHP File Upload for CKEditor

The code bellow is not mine but I find it to be working properly, which is why I am putting it here on my website for future reference. There is a full blown file browser plugin for CKEditor called CKFinder – if you have no knowledge with PHP and how to it works then I suggest that you just install CKFinder. Note that in the code bellow I am using a CDN reference and it will only work with CKEditor version 4.8.0 and bellow.

index.php

upload.php