Pass upload_dist to the factory