Skip to content
This repository has been archived by the owner on Feb 20, 2024. It is now read-only.

Commit

Permalink
🔀 merge dev to master
Browse files Browse the repository at this point in the history
0.8.6
  • Loading branch information
MingxuanGame authored Nov 12, 2023
2 parents 8fa7018 + 5de0031 commit c5c6f67
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions hertavilla/apis/img.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,20 +89,12 @@ async def upload_to_aliyun_oss(
"policy": params["params"]["policy"],
},
)
# for k, v in .items():
# form.add_field(k, v, content_type="text/plain")
form.add_field(
"file",
image,
filename=params["file_name"],
content_type="image/png",
)
form.add_field("file", image)
async with ClientSession() as session:
async with session.post(
params["params"]["host"],
data=form,
) as resp:
await resp.json()
if not resp.ok:
raise HTTPStatusError(resp.status)
return (await resp.json())["data"]["url"]
Expand Down

0 comments on commit c5c6f67

Please sign in to comment.