Added conditional upload button visibility