superseriousbusiness / gotosocial

Fast, fun, small ActivityPub server.
https://docs.gotosocial.org
GNU Affero General Public License v3.0
3.67k stars 311 forks source link

[feature] Allow arbitrary file attachment uploads as `unknown` type #1380

Open tsmethurst opened 1 year ago

tsmethurst commented 1 year ago

Not a high priority thing, but it would be nice if clients could upload any old files (that aren't in the /api/v1/instance supported mime types for media) and have them still display in statuses as an unknown attachment type.

This would allow users to upload pdfs and other documents, which would pass through the media manager in internal/media without any processing being performed.

related:

DavidGoodenough commented 1 year ago

I would also like to see this added. I am looking to use ActivityPub servers (GotoSocial in particular) in an IoT environment, and being able to send arbitrary files as attachments would be really useful. These would be private messages, i.e. between consenting apps in private, so the leakage to other apps should be minimal. It would also allow things like PDFs to be sent.

One difficult thing about the way that Mastodon do it, is that using "unknown" as the type means that no type information is available to the recipient. It would really be better if the server accepted any mime type, but only tried to display (or process) something is recognises. But this might cause problems with clients if they ever did get to see one of these (as documented in #810, so perhaps the unknown type is best as clients might have to start recognising it.