linebot use Flask python my code >>https://drive.google.com/file/d/1NxrjkcefeJ2eazCmMydKT3mbuLn0ecIJ/view?usp=sharing
def saveImage(message_id):not working i dont know how to solving this problem
def saveImage(message_id): line_bot_api = LineBotApi(Channel_access_token) message_content = line_bot_api.get_message_content(message_id) file_path = 'C:Usersb6109868DesktopLineBotProjectsaveimg' with open(file_path, 'wb') as fd: for chunk in message_content.iter_content(): fd.write(chunk) return 200
i dont know how to get image from line user and save image in python but i know i I have to use get-content by line deverloper url: https://developers.line.biz/en/reference/messaging-api/#get-content but I don't know where the code is.
Source: Python Questions