fix upload_image()

change 329: image = open(path) to open(path, 'rb')