initial image controller and defined constructor function
defined private upload function in image controller