• 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
  • 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