You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importrequestsurl="http://127.0.0.1/api/index.php"token="YOUR_TOKEN_HERE"# Replace with your actual tokenimage_path="path/to/your/image.jpg"# Replace with the path to your image filefiles= {
"image": open(image_path, "rb")
}
data= {
"token": token
}
response=requests.post(url, files=files, data=data)
print(response.text)
我尝试着使用python 实现API token批量上传图片到图床。
参考了提供的api使用文档
https://github.com/icret/EasyImages2.0/blob/master/docs/API.md
其中测试了《Python示例》部分的代码,无法成功导入payload部分和headers部分。
不知道可否给予一个比较清晰的payload入参的变量和对应参数的格式。
感激不尽。
The text was updated successfully, but these errors were encountered: