• 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

API Upload Error

anotherp

Chevereto Member
So I am using a code I found on another thread that I am currently having issues locating.

Here is the code I am using:

Code:
<form method="POST" action="http://picgur.org/api/1/upload">
    <input type="hidden" name="key" value="0a65553c54cf72127d11281f96518469" />
    <input type="file" name="source" />
    <input type="submit"></input>
</form>

And here is the page for the test: http://www.picgur.org/thing.html

When I choose and image and hit upload I get this error:
Code:
{"status_code":400,"error":{"message":"Invalid base64 string.","code":120,"context":"Exception"},"status_txt":"Bad Request"}

Not sure what I am doing wrong.
 
You are missing enctype="multipart/form-data"

Code:
<form method="POST" action="http://picgur.org/api/1/upload" enctype="multipart/form-data">
    <input type="hidden" name="key" value="0a65553c54cf72127d11281f96518469" />
    <input type="file" name="source" />
    <input type="submit"></input>
</form>
 
Excellent! The form now does post the image uploaded. However, after upload it forwards you to this information:

12dc3e7b4492.png

Any way you could save me some googling and show me how to redirect to a set page after upload?
More precisely, I would like it to forward to the Image Page for the new upload.

Thanks again.
 
I could kiss you Rodolfo!
Working exactly as I wanted. I cannot say enough good things about You, Chevereto and the whole community!
 
Back
Top