Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

"You need tender loving care once a week - so that I can slap you into shape." -- Ellyn Mustard


computers / comp.misc / Re: imgur / image-upload API specs

SubjectAuthor
* imgur / image-upload API specsJohn
+* Re: imgur / image-upload API specsComputer Nerd Kev
|`* Re: imgur / image-upload API specsJohn
| +- Re: imgur / image-upload API specsComputer Nerd Kev
| `- Re: imgur / image-upload API specsIvan Shmakov
`- Re: imgur / image-upload API specsEli the Bearded

1
imgur / image-upload API specs

<86mt0kmf9j.fsf@building-m.net>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=2636&group=comp.misc#2636

  copy link   Newsgroups: comp.infosystems.www.misc comp.misc
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.quux.org!news.building-m.net!.POSTED.localhost!not-for-mail
From: joh...@building-m.simplistic-anti-spam-measure.net (John)
Newsgroups: comp.infosystems.www.misc,comp.misc
Subject: imgur / image-upload API specs
Date: Wed, 28 Jun 2023 03:34:16 +0000
Organization: Building M
Message-ID: <86mt0kmf9j.fsf@building-m.net>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: ritvax.building-m.net; posting-host="localhost:::1";
logging-data="1070558"; mail-complaints-to="abuse@building-m.net"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:11Vfb2jOCAgBNjn+Kv+NCCmt7lc=
 by: John - Wed, 28 Jun 2023 03:34 UTC

The recent decision by imgur to delete non-account-associated uploads
got me thinking about WWW resource persistence and self-hosting yet
again. People used imgur because it was convenient and free; uploading
an image and sending a link was a simple process.

Imgur also had an API which applications could integrate with, so for
example flameshot can just upload your screenshots directly to imgur if
desired. Most of these applications just assume you're uploading to
imgur, but if some other server implemented the same HTTP API endpoints,
it would be a drop-in replacement--but I haven't heard of anything like
that!

Is anyone aware of open-source servers which implement an
Imgur-compatible API, or of efforts to define a "standard" set of
endpoints for image uploading and retrieval? Seems like it ought to be
an RFC or something but maybe that's a little out of their scope.

john

Re: imgur / image-upload API specs

<649cbeeb@news.ausics.net>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=2637&group=comp.misc#2637

  copy link   Newsgroups: comp.infosystems.www.misc comp.misc
Message-ID: <649cbeeb@news.ausics.net>
From: not...@telling.you.invalid (Computer Nerd Kev)
Subject: Re: imgur / image-upload API specs
Newsgroups: comp.infosystems.www.misc,comp.misc
References: <86mt0kmf9j.fsf@building-m.net>
User-Agent: tin/2.0.1-20111224 ("Achenvoir") (UNIX) (Linux/2.4.31 (i586))
NNTP-Posting-Host: news.ausics.net
Date: 29 Jun 2023 09:14:51 +1000
Organization: Ausics - https://www.ausics.net
Lines: 51
X-Complaints: abuse@ausics.net
Path: i2pn2.org!rocksolid2!news.neodome.net!csiph.com!news.bbs.nz!news.ausics.net!not-for-mail
 by: Computer Nerd Kev - Wed, 28 Jun 2023 23:14 UTC

In comp.misc John <john@building-m.simplistic-anti-spam-measure.net> wrote:
> The recent decision by imgur to delete non-account-associated uploads
> got me thinking about WWW resource persistence and self-hosting yet
> again. People used imgur because it was convenient and free; uploading
> an image and sending a link was a simple process.

It wasn't convenient for me receiving those links. Links to Imgur
images don't work without Javascript, so not in my preferred
lightweight web browsers, and even in Firefox it takes ages to load,
and (with my configuration, at least) sometimes a few page reloads.
99% of the time I just ignore Imgur links, and for the other 1% it
usually turns out that it wasn't worth the effort.

> Imgur also had an API which applications could integrate with, so for
> example flameshot can just upload your screenshots directly to imgur if
> desired. Most of these applications just assume you're uploading to
> imgur, but if some other server implemented the same HTTP API endpoints,
> it would be a drop-in replacement--but I haven't heard of anything like
> that!

If the applications are hard-coded to use the Imgur server, would
changing the server really be much harder than replacing that code
with a dead-simple HTTP POST to another server, without the fancy
API?

> Is anyone aware of open-source servers which implement an
> Imgur-compatible API, or of efforts to define a "standard" set of
> endpoints for image uploading and retrieval?

Why does it need to be a standard? HTTP makes this very easy to
build from scratch, it's a typical HTML form example task. If Imgur
makes it so complicated that it could be its own standard, that's
their problem. Rip all that out and put in something sensible
instead!

A quick search suggests that Imgur use OAuth 2 in the API for
restricting API access, so that's just for their own benefit.

Even better, set up an SFTP (FTPS, FTP) server and allow people to
use that for uploading photos without a clunky web interface. Bulk
uploads are _far_ easier using SFTP than via web interfaces, and
photos are often uploaded in large numbers. Heck that's probably
why those API applications get used instead of the Imgur website
in the first place. Use SFTP and you've got lots of wonderfully
easy to use FTP clients available already. Just write a script that
post-processes them for displaying in HTML after they've been
uploaded. HTTP is the wrong route from the get-go, if you ask me.

--
__ __
#_ < |\| |< _#

Re: imgur / image-upload API specs

<86ilb7m41f.fsf@building-m.net>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=2638&group=comp.misc#2638

  copy link   Newsgroups: comp.infosystems.www.misc comp.misc
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.quux.org!news.building-m.net!.POSTED.localhost!not-for-mail
From: joh...@building-m.simplistic-anti-spam-measure.net (John)
Newsgroups: comp.infosystems.www.misc,comp.misc
Subject: Re: imgur / image-upload API specs
Date: Thu, 29 Jun 2023 01:49:00 +0000
Organization: Building M
Message-ID: <86ilb7m41f.fsf@building-m.net>
References: <86mt0kmf9j.fsf@building-m.net> <649cbeeb@news.ausics.net>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: ritvax.building-m.net; posting-host="localhost:::1";
logging-data="1135877"; mail-complaints-to="abuse@building-m.net"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:sEu+F8GjVksH8XmJ6qhURRzle1A=
 by: John - Thu, 29 Jun 2023 01:49 UTC

not@telling.you.invalid (Computer Nerd Kev) writes:

> In comp.misc John <john@building-m.simplistic-anti-spam-measure.net> wrote:
>> The recent decision by imgur to delete non-account-associated uploads
>> got me thinking about WWW resource persistence and self-hosting yet
>> again. People used imgur because it was convenient and free; uploading
>> an image and sending a link was a simple process.
>
> It wasn't convenient for me receiving those links. Links to Imgur
> images don't work without Javascript, so not in my preferred
> lightweight web browsers, and even in Firefox it takes ages to load,
> and (with my configuration, at least) sometimes a few page reloads.
> 99% of the time I just ignore Imgur links, and for the other 1% it
> usually turns out that it wasn't worth the effort.
>

The people sending you the links were screwing up, then. What you do is
upload the image, then right-click the image on the resulting page and
copy the image link. No JS, it's just a JPG.

>> Is anyone aware of open-source servers which implement an
>> Imgur-compatible API, or of efforts to define a "standard" set of
>> endpoints for image uploading and retrieval?
>
> Why does it need to be a standard? HTTP makes this very easy to
> build from scratch, it's a typical HTML form example task. If Imgur
> makes it so complicated that it could be its own standard, that's
> their problem. Rip all that out and put in something sensible
> instead!

If a variety of different self-hosted options accept POST requests to
/imageapi/upload, then it's easy to use them interchangeably. That's the
advantage of a standard API.

> A quick search suggests that Imgur use OAuth 2 in the API for
> restricting API access, so that's just for their own benefit.
>
> Even better, set up an SFTP (FTPS, FTP) server and allow people to
> use that for uploading photos without a clunky web interface. Bulk
> uploads are _far_ easier using SFTP than via web interfaces, and
> photos are often uploaded in large numbers. Heck that's probably
> why those API applications get used instead of the Imgur website
> in the first place. Use SFTP and you've got lots of wonderfully
> easy to use FTP clients available already. Just write a script that
> post-processes them for displaying in HTML after they've been
> uploaded. HTTP is the wrong route from the get-go, if you ask me.

The reason you use HTTP is because basically every device can access
it. Damn near every firewall lets port 443 out. I love non-HTTP
protocols on a philosophical level, but I don't suggest "oh well
obviously the best way to let my mom share a picture is to have her
mount a 9P filesystem via FUSE..."

If there's a common/standard way to throw images at a backend service,
that means you can interface with it via curl, via a little HTML+JS
application you hack up, or from basically any program written in any
application which supports HTTP.

john

Re: imgur / image-upload API specs

<649cf877@news.ausics.net>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=2639&group=comp.misc#2639

  copy link   Newsgroups: comp.infosystems.www.misc comp.misc
Message-ID: <649cf877@news.ausics.net>
From: not...@telling.you.invalid (Computer Nerd Kev)
Subject: Re: imgur / image-upload API specs
Newsgroups: comp.infosystems.www.misc,comp.misc
References: <86mt0kmf9j.fsf@building-m.net> <649cbeeb@news.ausics.net> <86ilb7m41f.fsf@building-m.net>
User-Agent: tin/2.0.1-20111224 ("Achenvoir") (UNIX) (Linux/2.4.31 (i686))
NNTP-Posting-Host: news.ausics.net
Date: 29 Jun 2023 13:20:24 +1000
Organization: Ausics - https://www.ausics.net
Lines: 78
X-Complaints: abuse@ausics.net
Path: i2pn2.org!rocksolid2!news.neodome.net!weretis.net!feeder8.news.weretis.net!3.eu.feeder.erje.net!1.us.feeder.erje.net!feeder.erje.net!news.quux.org!news.bbs.nz!news.ausics.net!not-for-mail
 by: Computer Nerd Kev - Thu, 29 Jun 2023 03:20 UTC

In comp.misc John <john@building-m.simplistic-anti-spam-measure.net> wrote:
> not@telling.you.invalid (Computer Nerd Kev) writes:
>
>> In comp.misc John <john@building-m.simplistic-anti-spam-measure.net> wrote:
>>> The recent decision by imgur to delete non-account-associated uploads
>>> got me thinking about WWW resource persistence and self-hosting yet
>>> again. People used imgur because it was convenient and free; uploading
>>> an image and sending a link was a simple process.
>>
>> It wasn't convenient for me receiving those links. Links to Imgur
>> images don't work without Javascript, so not in my preferred
>> lightweight web browsers, and even in Firefox it takes ages to load,
>> and (with my configuration, at least) sometimes a few page reloads.
>> 99% of the time I just ignore Imgur links, and for the other 1% it
>> usually turns out that it wasn't worth the effort.
>>
> The people sending you the links were screwing up, then. What you do is
> upload the image, then right-click the image on the resulting page and
> copy the image link. No JS, it's just a JPG.

Ah, great! I see that sometimes simply adding ".jpg" to the end of
an Imgur link is enough to get past the usual "please enable JS to
make Imgur work" barrier. I never thought it might be that easy.

>>> Is anyone aware of open-source servers which implement an
>>> Imgur-compatible API, or of efforts to define a "standard" set of
>>> endpoints for image uploading and retrieval?
>>
>> Why does it need to be a standard? HTTP makes this very easy to
>> build from scratch, it's a typical HTML form example task. If Imgur
>> makes it so complicated that it could be its own standard, that's
>> their problem. Rip all that out and put in something sensible
>> instead!
>
> If a variety of different self-hosted options accept POST requests to
> /imageapi/upload, then it's easy to use them interchangeably. That's the
> advantage of a standard API.

Making it Imgur-compatible strikes me as having little benefit.
Existing programs will be hard-coded to use imgur.com, so they
won't work as-is, and yet when Imgur change their API on a whim,
your site/s have to change as well to stay compatible.

I guess the only way it might work is if you plan to play tricks
with what the imgur.com domain resolves to. On Linux you might
be able to get the image uploader program to use a different
network namespace with its own hosts file pointing imgur.com to
somewhere else.

>> Even better, set up an SFTP (FTPS, FTP) server and allow people to
>> use that for uploading photos without a clunky web interface. Bulk
>> uploads are _far_ easier using SFTP than via web interfaces, and
>> photos are often uploaded in large numbers. Heck that's probably
>> why those API applications get used instead of the Imgur website
>> in the first place. Use SFTP and you've got lots of wonderfully
>> easy to use FTP clients available already. Just write a script that
>> post-processes them for displaying in HTML after they've been
>> uploaded. HTTP is the wrong route from the get-go, if you ask me.
>
> The reason you use HTTP is because basically every device can access
> it. Damn near every firewall lets port 443 out. I love non-HTTP
> protocols on a philosophical level, but I don't suggest "oh well
> obviously the best way to let my mom share a picture is to have her
> mount a 9P filesystem via FUSE..."
>
> If there's a common/standard way to throw images at a backend service,
> that means you can interface with it via curl, via a little HTML+JS
> application you hack up, or from basically any program written in any
> application which supports HTTP.

My experience with hacking up over-complicated, semi-documented,
HTTPS APIs with Curl is that many hours and error messages could be
saved had an FTP-like protocol been used instead. Of course there's
no reason why using one protocol excludes also offering the other.

--
__ __
#_ < |\| |< _#

Re: imgur / image-upload API specs

<IkIXAhg1FihsR_ta@violet.siamics.net>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=2640&group=comp.misc#2640

  copy link   Newsgroups: comp.infosystems.www.misc comp.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: iva...@siamics.netNOSPAM.invalid (Ivan Shmakov)
Newsgroups: comp.infosystems.www.misc,comp.misc
Subject: Re: imgur / image-upload API specs
Date: Thu, 29 Jun 2023 08:12:09 +0000
Organization: A noiseless patient Spider
Lines: 60
Message-ID: <IkIXAhg1FihsR_ta@violet.siamics.net>
References: <86mt0kmf9j.fsf@building-m.net> <649cbeeb@news.ausics.net>
<86ilb7m41f.fsf@building-m.net>
Injection-Info: dont-email.me; posting-host="eba71b7bc5fe569e24ecdd6817a84bec";
logging-data="2220934"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19eswIEM4Np7lRS4VtqxucS"
Cancel-Lock: sha1:EnEN2NzPIKS9Cm4PfRZ38f5MTSY=
License: CC0-1.0 (original contributions only)
 by: Ivan Shmakov - Thu, 29 Jun 2023 08:12 UTC

>>>>> John <john@building-m.simplistic-anti-spam-measure.net> wrote:
>>>>> not@telling.you.invalid (Computer Nerd Kev) writes:
>>>>> John <john@building-m.simplistic-anti-spam-measure.net> wrote:

>>> The recent decision by imgur to delete non-account-associated uploads
>>> got me thinking about WWW resource persistence and self-hosting yet
>>> again. People used imgur because it was convenient and free; uploading
>>> an image and sending a link was a simple process.

I mostly ignore Imgur URIs that I encounter. If it took no effort
to upload, I'm not going to spend effort to view it, either.
(Though I understand there're cases when the effort is spend
elsewhere.)

More to the point, are "self-hosting" and the likes of Imgur
really the only available options? Because so far I can tell,
for something /you/ author there's at least Wikimedia sites.

FWIW, I've shared my share of images via Commons, and I have
a few small (and somewhat outdated by this point) Debian howtos
published on Wikibooks:

http://commons.wikimedia.org/wiki/Special:ListFiles/Ivan_Shmakov
http://ru.wikibooks.org/wiki/?curid=13007

There're practical considerations that limit my participation
on Wikimedia, but as a rule, I prefer a collaborative environment,
where my mistakes can be fixed without my direct involvement.

Then there're the likes of SDF, http://sdf.org/?join .

> If a variety of different self-hosted options accept POST requests
> to /imageapi/upload, then it's easy to use them interchangeably.
> That's the advantage of a standard API.

> If there's a common/standard way to throw images at a backend service,
> that means you can interface with it via curl, via a little HTML+JS
> application you hack up, or from basically any program written in any
> application which supports HTTP.

Very much seconded, both points.

But perhaps rather than reimplementing the (apparently complex)
Imgur API, it'd make sense to bug the developers of the applications
that support Imgur out-of-box to add support for http://ttm.sh/
and http://transfer.sh/ as well?

And while my Ecmascript / Javascript skills are nothing to brag
about, I understand that at this point, if I want to write an
application for an average Joe to use, Javascript is my best
bet by far. (And I'd be rather disinclined to try implementing
FTPS there.)

Even though my own programming language preferences (HTTP API
or not) lie elsewhere. Consider, e. g.:

http://am-1.org/~ivan/src/examples-2022/webwatch.mk

--
FSF associate member #7257 np. Wrecking Ball by Tiny Little Blackouts

Re: imgur / image-upload API specs

<eli$2307022147@qaz.wtf>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=2658&group=comp.misc#2658

  copy link   Newsgroups: comp.infosystems.www.misc comp.misc
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!panix!.POSTED.panix5.panix.com!qz!not-for-mail
From: *...@eli.users.panix.com (Eli the Bearded)
Newsgroups: comp.infosystems.www.misc,comp.misc
Subject: Re: imgur / image-upload API specs
Date: Mon, 3 Jul 2023 01:47:52 -0000 (UTC)
Organization: Some absurd concept
Message-ID: <eli$2307022147@qaz.wtf>
References: <86mt0kmf9j.fsf@building-m.net>
Injection-Date: Mon, 3 Jul 2023 01:47:52 -0000 (UTC)
Injection-Info: reader2.panix.com; posting-host="panix5.panix.com:166.84.1.5";
logging-data="16284"; mail-complaints-to="abuse@panix.com"
User-Agent: Vectrex rn 2.1 (beta)
X-Liz: It's actually happened, the entire Internet is a massive game of Redcode
X-Motto: "Erosion of rights never seems to reverse itself." -- kenny@panix
X-US-Congress: Moronic Fucks.
X-Attribution: EtB
XFrom: is a real address
Encrypted: double rot-13
 by: Eli the Bearded - Mon, 3 Jul 2023 01:47 UTC

In comp.infosystems.www.misc,
John <john@building-m.simplistic-anti-spam-measure.net> wrote:
> Is anyone aware of open-source servers which implement an
> Imgur-compatible API, or of efforts to define a "standard" set of
> endpoints for image uploading and retrieval? Seems like it ought to be
> an RFC or something but maybe that's a little out of their scope.

Chevereto seems to be a self-hosted Imgur clone. They'll try to steer
you towards paid hosting by them, but I understand there's an open
source version.

https://chevereto.com/

Versions 3 and 4 there, but he wants you to buy them (not rent via
subscription). There are free versions but they are getting hard to
find:

https://github.com/tanmng/docker-chevereto
https://github.com/rodber/chevereto-free

Chevereto focuses on easy uploading, easy sharing. It doesn't do tags
and has limited searching. I found a free site suitable for demo
test/run:

https://jpg.church/

(It redirects to jpg.pet today, but the backed is still jpg.church.
JPG(Pet|Church) doesn't seem to have email, so you can sign up with a bogus
address, such as foobar@jpg.church / fishysite)

Elijah
------
has not looked at the API of Chevereto

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor