adding upload method to the controller