Creating functionality for upload