add config.py,  adjust upload function