Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File upload #100

Open
emersion opened this issue Nov 9, 2022 · 7 comments
Open

File upload #100

emersion opened this issue Nov 9, 2022 · 7 comments

Comments

@emersion
Copy link

emersion commented Nov 9, 2022

On many messaging platforms, the server provider is also responsible for providing a way for clients to upload attachments. This removes the need for clients to maintain/pick their own upload service.

@progval has written a proposal: https://github.com/progval/ircv3-specifications/blob/filehost/extensions/filehost.md

Prior art:

@slingamn
Copy link

slingamn commented Nov 9, 2022

Some ideas that have come up before:

  1. I think the 005 token should point to an extensible metadata JSON file, rather than the bare upload endpoint
  2. It's worth thinking a little bit about authentication up front (I like EXTJWT for this, but other people might think differently)
  3. One of the functions of this should be to specify an image hosting domain (not necessarily the same as the upload endpoint domain) that is trusted for image auto-fetch (as in, no less trusted than the ircd from an IP address privacy standpoint)

@slingamn
Copy link

slingamn commented Nov 9, 2022

Also, large uploads will require resumeability, for which there's https://tus.io/

@nektro
Copy link

nektro commented Nov 9, 2022

it would likely be easier for clients to support something akin to https://getsharex.com/docs/custom-uploader and then send the url to the chat

@GIJack
Copy link

GIJack commented Nov 13, 2022

No. It would be better all around if file handling gets done in band. The ONLY way to do this with IRCv2 is with DCC, which is between clients.

On the modern internet, clients don't and shouldn't expose IP addresses directly to eachother. Also, because firewall rules, IRC should handle everything in band.

@SadieCat
Copy link

Please be realistic. There is zero chance of any implementation adding in-band file transfers. Any in-band transfer will block the client connection until it is finished and will require some overengineered escaping system as IRC messages are inherently text-based.

@emersion
Copy link
Author

soju + goguma now support this spec: https://git.sr.ht/~emersion/soju/tree/master/item/doc/ext/filehost.md

@GIJack
Copy link

GIJack commented Feb 1, 2024

Please be realistic. There is zero chance of any implementation adding in-band file transfers. Any in-band transfer will block the client connection until it is finished and will require some overengineered escaping system as IRC messages are inherently text-based.

By overengineed escaping system, you mean base64, which has been a standard for encoding binary data in text-only streams for decades now.

Shit, I am pretty sure you could probably define this as another ctcp sub-protocol with base64 encoding for data, and some basic signalling for start/stop/meta for things like file length and checksum. You could also probably use ctcp to negotiate checksum.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants