huchiahsi commited on
Commit
32c7a28
·
verified ·
1 Parent(s): b64b32f

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -2
main.py CHANGED
@@ -112,7 +112,7 @@ def handle_content_message(event):
112
  dist_path = tempfile_path + '.' + ext
113
  dist_name = os.path.basename(dist_path)
114
  os.rename(tempfile_path, dist_path)
115
- uploaded_image = imgur_client.upload_image(dist_path, title="上傳測試")
116
 
117
  with ApiClient(configuration) as api_client:
118
  line_bot_api = MessagingApi(api_client)
@@ -121,7 +121,7 @@ def handle_content_message(event):
121
  reply_token=event.reply_token,
122
  messages=[
123
  TextMessage(text='Save content.'),
124
- TextMessage(text=uploaded_image)
125
  # TextMessage(text=request.host_url + os.path.join('static', 'tmp', dist_name))
126
  ]
127
  )
 
112
  dist_path = tempfile_path + '.' + ext
113
  dist_name = os.path.basename(dist_path)
114
  os.rename(tempfile_path, dist_path)
115
+ uploaded_image = imgur_client.upload_image(dist_path)
116
 
117
  with ApiClient(configuration) as api_client:
118
  line_bot_api = MessagingApi(api_client)
 
121
  reply_token=event.reply_token,
122
  messages=[
123
  TextMessage(text='Save content.'),
124
+ TextMessage(text=uploaded_image.link)
125
  # TextMessage(text=request.host_url + os.path.join('static', 'tmp', dist_name))
126
  ]
127
  )