Implementation of upload action.