File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -123,6 +123,30 @@ conv.destroy
123123
124124```
125125
126+ #### Initiating a Rich Content Upload
127+
128+ ``` ruby
129+ conv = platform.conversations.find(" conversation_id" )
130+ content = conv.content.create(mime_type: " image/png" , file: File .open (" image.png" ))
131+ # => #<Layer::Resources::RichContent @attributes={...}>
132+
133+ content.upload_url
134+ # => "https://www.googleapis.com/upload/storage/path/to/content"
135+ ```
136+
137+ #### Refreshing the download URL for a Content Object
138+
139+ ``` ruby
140+ content = conv.content.find(" content_id" )
141+ # => #<Layer::Resources::RichContent @attributes={...}>
142+
143+ content.download_url
144+ # => "http://google-testbucket.storage.googleapis.com/some/download/path"
145+
146+ content.refresh_url
147+ " https://api.layer.com/apps/<APP_ID>/conversations/<CONVERSATION_ID>/content/<CONTENT_ID>"
148+ ```
149+
126150#### Sending Messages ####
127151
128152``` ruby
You can’t perform that action at this time.
0 commit comments