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

python / bash api upload

sbucket

Chevereto Member
Hi,

I've been using chevereto 1.9x for a while now and modified one of the existing filehosts in uimge to my needs for console uploading, but it appears that doesn't work with 2.x anymore.

Now my question is, if any of you has attempted and succeeded in writing a python/bash script to upload to 2.x would be willing to share it with me. I'd even be willing to pay for this, as long as the price is reasonable. :)
Thanks for your time.

Edit: Added the uimge part, which I forgot… :rolleyes:
 
Thanks, I realised that almost immediately, silly me :)
Very easy to use, now uploading is fully automated, thanks !
 
I come back here because it's not as easy as I thought.
It works fine with image URLs to upload the image, but I can't figure out how to send base64 data ?
Must I use php or such ? With bash and curl, it's impossible to post such a long string.
 
Actually, you don't need curl. Chevereto API accepts any request, this can be a form, a XMLHttpRequest, curl, etc.

Key point here is when you want to upload files. Due to protocol limitations, you can't send the file using a GET request, it must be POST. So for folks not using $_FILE or File I did a base64 implementation which needs to be in proper base64. You can easy test this by converting the image online and using that base64 output. If that works then you base64 encoder is missing something (most likely issue).

Otherwise, you can send the file as an actual File, Chevereto API will read it as $_FILES. For instance, in a XMLHttpRequest you need to create a form then attach the file to it. I don't know if in python you have something to read files.

Cheers,
 
By the way, you are using this to upload from one server o another right?
 
But the problem is I'm trying to use BASH only, not php or such.
Maybe it's just not possible with just BASH ...
 
Yes, is possible. Most likely you have a restriction in the POST request. Maybe the system is limiting your POST size or things like that. And of course, at this point you must be 100% sure that the generated base64 is correct.
 
I used to have a functioning Chevereto image host that would allow me to bash upload but I guess you can't move Chevereto without it getting busted bad....

Tried to click on the documentation link Rodolfo provided and this is the wonderful page that I get:

Documentation
The official Chevereto documentation is being reviewed and is not available at this time. We are working on it so please come back later. In the meanwhile you may find what you need in our forums.

G\ documentation
Chevereto uses the G\ Library PHP framework and you may find useful the G\ Library documentation.


So far I haven't found what I need in the forums :\ What I need was in that documentation which I used initially to write this script several months back.
 
Old documentation won't give any useful information. I build up the whole system again, Chevereto 2 is not even closer to what Chevereto 3 is. V3 documentation will take time and I will start writing it only when all the crucial features and bugs are fixed.

Cheers.
 
Trust me, I know how much time documentation takes to write, everybody reads it and thinks that it must be easy to produce, but sometimes it can take as much time as the actual development of the code-base to accurately document the product.

The problem is that you shouldn't remove the old documents until the new documents have already been posted for a fair amount of time (usually 1-2 years) as there will be customers who either do not need to or do not want to upgrade to version 3.

Personally I am of the do not want to upgrade camp because of all the problems my friend had with it so far. Since my image host is a live site I'd much rather prefer for all the kinks to be worked out, certainly seeing documentation pulled like this makes me less eager to upgrade as I'm fearful that there is too much jumping of the gun here...

I have read all of the promises made in this forum for feature requests to be fulfilled in version 3 and I honestly do look forward to this, but first and foremost I just need to get my existing image host fully operational again, and unfortunately I've spent a day taking shots in the dark by guessing at what I should troubleshoot. In comparison when there actually was documentation available when I first installed Chevereto seven months ago I was able to configure things properly in a matter of minutes.
 
Yup, OK thanks I got it and was able to straighten things out.

On another note using a VM I spun up earlier I'm playing around with the latest beta version (v3) you've been working on.

So far it looks good, but I'm just playing around for now and I'm still holding off on even thinking about an upgrade due to the massive flaws in the database that make it not possible to upgrade from the existing fully functional build of Chevereto (v2). My friend's existing image host was completely trashed by these database issues and fortunately I think the database guy he hired to fix it was able to straighten things out, and unfortunately from what I see on this forum my friend isn't alone....
 
You mean the bad update issues?. Those are layer 8 and take care of them is a walk in the park. Actually I'm uploading a release that will take care of that issue.

By the way V3 isn't beta. Well, if we use the stric meaning of the term then is beta, but we all know that is not beta.

Cheers.
 
Last edited:
Back
Top