acmyu commited on
Commit
48d25f8
·
1 Parent(s): 4891e68

fix upload filename

Browse files
Files changed (1) hide show
  1. main.py +2 -2
main.py CHANGED
@@ -87,12 +87,12 @@ def save_temp_imgs(imgs):
87
 
88
  for img in imgs:
89
 
90
- img_name = '@temp/'+str(uuid.uuid4())+'.png'
91
  img.save(img_name)
92
  print(img_name)
93
 
94
  url = 'https://tmpfiles.org/api/v1/upload'
95
- data_payload = {'file': img_name}
96
 
97
  try:
98
  response = requests.post(url, data=data_payload)
 
87
 
88
  for img in imgs:
89
 
90
+ img_name = 'temp/'+str(uuid.uuid4())+'.png'
91
  img.save(img_name)
92
  print(img_name)
93
 
94
  url = 'https://tmpfiles.org/api/v1/upload'
95
+ data_payload = {'file': '@'+img_name}
96
 
97
  try:
98
  response = requests.post(url, data=data_payload)