CLOUDIFY-1801 UplaodController code improvements.