• 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.
  • Chevereto Support CLST

    Support response

    Support checklist

    • ⚠️ Got a Something went wrong message? Read this guide and provide the actual error. Do not skip this.
    • ✅ Confirm that the server meets the System Requirements
    • 🔥 Check for any available Hotfix - your issue could be already reported/fixed
    • 📚 Read documentation - It will be required to Debug and understand Errors for a faster support response

Awaiting feedback API (?bug)

Gatses

Chevereto Member
Hello there!

I have some problems with API.
When I try to use it I always geting exception
Invalid base64 string.
with error code 120
I checked code and found this..
Well, i think function !G\timing_sage_compare just comparing 1st and 2nd arguments.. (I didn't see this function)
And i just tried to test this situation:

PHP:
$a = 'aaaaa';
$a1 = base64_decode($a);
$a2 = base64_encode($a1);
print($a);
print('<br/>');
print($a1);
print('<br/>');
print($a2);

And I've got this:

Code:
aaaaa
i¦љ
aaaa

I think 'aaaaa' not equival 'aaaa'..
Am i right? Is it bug? Maybe it caused file encoding problems? At my PC I've got file:

user@pc:~$ file -bi /home/user/chevereto/app/routes/route.api.php
text/x-php; charset=us-ascii

Sorry for my English once again
 
I've just tested the API in my localhost and it worked. Note that you can use a _FILE multipart or a base64 image encoded string.

To test the API you can so something like this (api.html in the root Chevereto folder):

Code:
<form method="post" action="/api/1/upload/?key=API_KEY_HERE">
    <textarea name="source"></textarea>
    <input type="submit"></submit>
</form>

then get a image base64 string here: http://www.base64-image.de/step-1.php

And it should work. Note that if you use the base64 string as _GET request you will most likely get issues because when you send a get request the data is urlencoded and that affects the base64 string so you should always use _POST when dealing with base64 strings.
 
GET only works for remote upload. For local upload you must use POST.
 
API hasn't the bug mentioned. This problem is related to you using the endpoint rather than an error in the endpoint.
 
Back
Top