Draft: Image upload and mime types
Not finished cooking, but wanted to have this opened already.
And depending on where this goes exactly, there might be some API breakage.
Overview of the changes:
- Add public and private APIs for handling
GInputStream
s - Make streams first class citizens and move away from
GFile
(for the actual file uploads we're already using streams) - Try reducing
g_object_(s|g)et_data()
usage - And of course there are the usual set of cleanups/fixes
- Initial support for adding relevant metadata for
m.image
(but no thumbnails yet - this will be done as a followup)
TODOs:
-
unWIP the WIP commits -
Get rid of temporary dirty hacks -
Ensure that async calls don't contain any blocking I/O (which is currently the case) -
split CmRoomMessageEvent
into two distinct classesCmRoomMsgTextEvent
andCmRoomMsgMediaEvent
(see !101 (comment 282216))
Edited by Evangelos Ribeiro Tzaras