• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.

API Base64 not working..

Status
Not open for further replies.

neoark

Chevereto Member
Website URL
<private>

Chevereto version
3.10.10

Description of the issue
I am trying to post an image with python using base64 and I am running into an issue.

with open( imagePath, "rb" ) as image_file:
encoded_string = base64.b64encode(image_file.read())

response1 = requests.post("https://test.test/testapi/1/upload/...RyeK2otfmCXn9a7ZUcGfEYrBU&format=json&source=", data=encoded_string, headers={ "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) App$
response = response1.content

It keeps giving me an invalid Base64 error. Any clue what's going on?
 
Don't send the image using base64. Use FILES (send it as a form).
 
Status
Not open for further replies.
Back
Top