craftgamesnetwork commited on
Commit
5d7c8ac
·
verified ·
1 Parent(s): 39ba7a3

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -3
main.py CHANGED
@@ -8,9 +8,8 @@ app = Flask(__name__)
8
 
9
  # Função para chamar a API de hospedagem de imagens
10
  def host_image(endpoint, image_path):
11
- api_url = "https://wosocial.bubbleapps.io/version-test/api/1.1/wf/save"
12
- image_url = f"{endpoint}/file={image_path}"
13
- files = {'file': open(image_url, 'rb')}
14
  response = requests.post(api_url, files=files)
15
  if response.status_code == 200:
16
  return response.json()["response"]["result"]
 
8
 
9
  # Função para chamar a API de hospedagem de imagens
10
  def host_image(endpoint, image_path):
11
+ api_url = "https://wosocial.bubbleapps.io/version-test/api/1.1/wf/save?file="
12
+ img_url = f"{endpoint}/file={result_path}"
 
13
  response = requests.post(api_url, files=files)
14
  if response.status_code == 200:
15
  return response.json()["response"]["result"]