• 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

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