Method: MatrixSdk::Client#upload
- Defined in:
- lib/matrix_sdk/client.rb
#upload(content, content_type) ⇒ Object
237 238 239 240 241 242 |
# File 'lib/matrix_sdk/client.rb', line 237 def upload(content, content_type) data = api.media_upload(content, content_type) return data[:content_uri] if data.key? :content_uri raise MatrixUnexpectedResponseError, 'Upload succeeded, but no media URI returned' end |