upload event in python