Added another controller function to manage image uploads