If you use the TinyMCE Image Manager and CodeIgniter together, this class can save you a bit of work.
“This package can handle TinyMCE Image Manager image uploads using CodeIgniter.
It is a port of the TinyMCE image manager plugin to integrate it with CodeIgniter framework.
This class was originally written by Andrey Antonov.
-Pablo Matias Perrone”