diff --git a/src/matrix-http-api.c b/src/matrix-http-api.c index c5270bc..0994ebe 100644 --- a/src/matrix-http-api.c +++ b/src/matrix-http-api.c @@ -1214,6 +1214,21 @@ i_media_thumbnail(MatrixAPI *api, g_free(path); } +static void +i_media_upload(MatrixAPI *api, + MatrixAPICallback callback, + gpointer user_data, + const gchar *content_type, + GByteArray *content, + GError **error) +{ + _send(MATRIX_HTTP_API(api), + callback, user_data, + CALL_MEDIA, + "POST", "upload", NULL, content_type, NULL, content, + FALSE, error); +} + static void matrix_http_api_matrix_api_init(MatrixAPIInterface *iface) { @@ -1227,7 +1242,7 @@ matrix_http_api_matrix_api_init(MatrixAPIInterface *iface) /* Media */ iface->media_download = i_media_download; iface->media_thumbnail = i_media_thumbnail; - iface->media_upload = NULL; + iface->media_upload = i_media_upload; /* Presence */ iface->get_presence_list = i_get_presence_list;