ircv3 / ircv3-ideas

46 stars 3 forks source link

Messages with images #4

Closed DanielOaks closed 7 years ago

DanielOaks commented 7 years ago

With Slack and such, you can drag an image into your client and it'll upload to Slack for everyone else to see.

Similar functionality would be nice to have for IRC clients that wish to use it. Here are some proposed ideas:

@dequis posted this, and it's essentially along the lines of what I was thinking for the best way to approach it:


Using an external protocol complicates stuff.. new ports to open (NAT/firewall issues) sync with another service/process supplying that protocol.

If this is your main concern, there are two ports that are available practically everywhere: 80 and 443.

My idea of an out of band implementation of upload would be the ircd providing a http(s) url, optionally with user/session/channel specific GET parameters (for any required rate limiting), which can be accessed directly by the user (showing an html page) or can be POSTed directly by the irc client with multipart/form-data with predefined field names, and returns the result in an easily parseable format - which, if no extra information is needed, may be just a 302 Found redirect with the image URL in the Location header and the plaintext body.

DanielOaks commented 7 years ago

I should add, the main mark against a proposal like that is that it may not work with public IRC nets. For this sort of workflow I'd imagine some fallback solutions (such as falling back to other public image upload services) for clients that want to implement them.

jwheare commented 7 years ago

This is one of those things that is more about infrastructure than protocol. All of the hosted services mentioned that allow image uploads do so through an http endpoint to a service that is external to their main chat protocol. They just happen to control both the chat service and the image hosting service so it's easy to integrate. IRCCloud file uploads work the same way.

This working group is primarily about defining features within the existing IRC protocol. As this suggestion involves using a separate protocol and separate infrastructure it's pretty much out of scope.

Of course, it's already possible for a client to integrate with any public image hosting service, for easy uploading and embedding, and several do. Imgur has an API and there are a few ui libraries out there that provide a standard interface for embedding and uploading to multiple services.

Any desire to standardise an interface for uploading to any image host is frought with issues, because different hosts have different requirements of scaling, production environment, authentication, load balancing, programming language.

I don't think it's feasible for IRCv3 to tackle this issue.

lollipopman commented 2 years ago

I don't think it's feasible for IRCv3 to tackle this issue.

@jwheare would the IRCv3 batch extension open up the possibility of encoding images or other data inline?

jwheare commented 2 years ago

I still don't think sending image data in band is workable.