You are not logged in.

#1 2024-03-23 14:05:02

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 2,640

bl-imgbb-upload

https://forums.bunsenlabs.org/viewtopic … 20#p133020

@johnraff,
thank you for this hint. I did not know that BL also has an imgbb-upload.

I have now tested both variants, your currently published script under ~/bin/
as well as the already existing one under /usr/bin/

u9DXGbGt.png


Both show the error:
SUcVCcQt.png


Edit: Failed to parse options
imgbb requires an API key and I think that's where the error lies.   lol

Last edited by unklar (2024-03-23 15:13:19)

Offline

#2 2024-03-24 01:42:51

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,550
Website

Re: bl-imgbb-upload

Does imgbb allow anonymous uploads like imgur?
If so, then probably bl-imgbb-upload can be fixed.


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#3 2024-03-24 02:03:56

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,550
Website

Re: bl-imgbb-upload

Just to check, I uploaded this image via Thunar's right-click option which uses bl-imgur-upload. Note that the file .jpeg ending is correctly included in the BB code:
RTQmhZUt.jpeg
Even so, the first time I clicked it, I was taken to the image embedded in a regular imgur page. A second click on the same image went directly to the image, as had always been the case before. Something has changed in the way imgur behaves.
(Interesting also to note that the file ending on my system is .jpg while imgur has changed it to .jpeg)

Anyway, let's see if imgbb might be a better alternative...


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#4 2024-03-24 07:19:58

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,550
Website

Re: bl-imgbb-upload

unklar wrote:

Failed to parse options
imgbb requires an API key and I think that's where the error lies.

I just tried out bl-imgbb-upload and there are two separate issues:

1) imgbb does seem to require registering to get an api key - no anonymous uploads like imgur.
If you run 'bl-imgbb-upload --file <some file>' then a yad window comes up asking for your api details. Once you've entered it, it will be stored for future use, but you do have to create an account.

But before you get to that point:

2) The Thunar custom action passes an extra argument --auto-upload to bl-imgur-upload. This doesn't work with bl-imgbb-upload, so it errors out with "Failed to parse options".

I need to have a look at bl-imgur-upload to see why it needs --auto-upload, and why bb-imgbb-upload doesn't like it. Maybe bl-imgbb-upload can be tweaked just to ignore '--auto-upload'. Ideally, the two scripts should take identical arguments. (I didn't write these scripts, but the original author is no longer around to ask.)


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#5 2024-03-24 10:47:01

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 2,640

Re: bl-imgbb-upload

johnraff wrote:

1) imgbb does seem to require registering to get an api key - no anonymous uploads like imgur.

I was able to perform an anonymous upload with imgbb (without the script). If I want to remain the master of my pictures, I have to register.

Other than that, all your observations match mine.


Edit: @hhh probably did the same here   wink

Last edited by unklar (2024-03-24 10:50:08)

Offline

#6 2024-03-24 11:19:34

hhh
Gaucho
From: High in the Custerdome
Registered: 2015-09-17
Posts: 16,032
Website

Re: bl-imgbb-upload

unklar wrote:

Edit: @hhh probably did the same here   wink

I uploaded without an account through their web interface, then formatted the link my self as described in this earlier post.

Like the other image hosting sites, the forum/BB code link imgbb provide brings you to an intermediate page with a reduced-size scrot on it. You can click that to enlarge it, then right-click>View in New Tab/Window and then you can see the original scrot.


No, he can't sleep on the floor. What do you think I'm yelling for?!!!

Offline

#7 2024-03-24 16:00:30

r.chaffee53
Member
Registered: 2023-08-02
Posts: 123

Re: bl-imgbb-upload

hhh wrote:

Like the other image hosting sites, the forum/BB code link imgbb provide brings you to an intermediate page with a reduced-size scrot on it.

Total control of how your images will be shown using imgbb.

Create thumbnail image of your original; whatever the forum guidelines are.

image.jpg
image-thumb.jpg

Upload them both to imgbb.

Click on image-thumb.jpg. A viewing page opens; click on the image.
A page opens showing image-thumb.jpg and the embedded codes.

Copy - Thumbnail image (linked) - BBCode.

Paste in in your post.

[url=https://ibb.co/xxxxxxx][img]https://i.ibb.co/xxxxxx/image=image-thumb.pg[/img][/url]

- - - - - - - - - - - - - - - - -  ^ image.jpg - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  image-thumb.jpg ^

- - - - -  shows image.jpg with a background page from imgbb - - - - - - - - - shows as thumbnail with no background page.

---

On that page is a Image URL. Copy that URL and replace the thumb-image link above.

[url=https://ibb.co/xxxxxxx][img]https://i.ibb.co/xxxxxxx/image-thumb.jpg[/img][/url]

- - - - - - - - - - - - - - - - -  ^ image.jpg - - - - - - - - - - - - - - - - - - - -  (replaced link) - -  image-thumb.jpg ^

---

Close those tab(s), back to the imgbb home page. Click on image.jpg.

Repeat same process for the full size image.

Click on image.jpg. A viewing page opens; click on image.
A page opens showing image.jpg and the embedded codes.
Image URL.
Copy that URL and replace image.jpg link with the link you copied.

---

Thumbnail in forum is the size you made it, not imgbb's idea of a thumbnail.

Full image is presented full screen with no imgbb background page.

Hot linking is allowed if your a member of imgbb.

You've paid the dues, no need to advertise for imgbb.

Bob

Last edited by r.chaffee53 (2024-03-24 17:26:18)

Offline

#8 2024-03-25 02:05:52

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,550
Website

Re: bl-imgbb-upload

r.chaffee53 wrote:

Hot linking is allowed if your a member of imgbb.

This. If you have an imgbb account then you can also get an api key and the bl-imgbb-upload script will work for you, without any extra work on your part. To do an anonymous upload without an imgbb account you have to use a web browser with javascript and cookies enabled, no automation.

Up until recently it was possible to do an anonymous (no account) scripted upload to imgur and the link would go directly to the image, with no wrapping. Now, while the anonymous upload still works, my impression is that the first time you click the direct image link you get taken to the imgur site, but after that it goes straight to the image.


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#9 2024-03-25 02:46:16

r.chaffee53
Member
Registered: 2023-08-02
Posts: 123

Re: bl-imgbb-upload

johnraff wrote:

This. If you have an imgbb account then you can also get an api key and the bl-imgbb-upload script will work for you, without any extra work on your part.

Please, what does imgbb offer for an image done this way; imgbb background page or no advertising?

Thank you for your time.
Bob

Edit: I know non-members who still hot link without issue, just like I did; before they had the upgrade link working.

Last edited by r.chaffee53 (2024-03-25 02:52:26)

Offline

#10 2024-03-25 04:50:50

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,550
Website

Re: bl-imgbb-upload

r.chaffee53 wrote:
johnraff wrote:

This. If you have an imgbb account then you can also get an api key and the bl-imgbb-upload script will work for you, without any extra work on your part.

Please, what does imgbb offer for an image done this way; imgbb background page or no advertising?

I just created an imgbb account, got an api key to test this, and bl-imgbb-upload (shipped with BunsenLabs) did what it claims. The link below goes directly to the image, for me anyway.
abingdon.jpg

Do you have an imgbb account? If so, you can get an api key here: https://api.imgbb.com
bl-imgbb-upload should prompt you to enter your key when uploading an image. (After the first time, it is stored.)

Thank you for your time.

You're welcome. smile

NB images uploaded this way are not anonymous - they will be associated with your account. For this reason, I prefer to use imgur.

I know non-members who still hot link without issue

But you said before:

Hot linking is allowed if your a member of imgbb.

Last edited by johnraff (2024-03-25 04:54:43)


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#11 2024-03-26 18:56:16

r.chaffee53
Member
Registered: 2023-08-02
Posts: 123

Re: bl-imgbb-upload

johnraff wrote:

I just created an imgbb account, got an api key to test this, and bl-imgbb-upload (shipped with BunsenLabs) did what it claims. The link below goes directly to the image, for me anyway.

Thanks for the info. Maybe this old dog could learn one more trick.

Regards,
BoB

Offline

Board footer

Powered by FluxBB