uploadImage code cleanup
Merge branches 'uploadImage_clean' and 'master'