• Welcome to the Chevereto User Community!

    Here, users from all over the world come together to learn, share, and collaborate on everything related to Chevereto. It's a place to exchange ideas, ask questions, and help improve the software.

    Please keep in mind:

    • This community is user-driven. Always be polite and respectful to others.
    • Support development by purchasing a Chevereto license, which also gives you priority support.
    • Go further by joining the Community Subscription for even faster response times and to help sustain this space

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