File tree Expand file tree Collapse file tree 2 files changed +23
-3
lines changed
Expand file tree Collapse file tree 2 files changed +23
-3
lines changed Original file line number Diff line number Diff line change @@ -181,6 +181,26 @@ def send(self, **kwargs):
181181 name='document.pdf',
182182 filename='/full/path/to/document.pdf'
183183 )
184+ :param inline_images: List of dicts. For example:
185+
186+ .. code-block:: python
187+
188+ dict(
189+ type='image/png',
190+ name='imageCID',
191+ data='base64 encoded string'
192+ )
193+
194+ Replace `data` with `filename` if you want the library to perform
195+ the base64 conversion. For example:
196+
197+ .. code-block:: python
198+
199+ dict(
200+ type='image/png',
201+ name='imageCID',
202+ filename='/full/path/to/image.png'
203+ )
184204
185205 :param str start_time: Delay generation of messages until this
186206 datetime. Format YYYY-MM-DDTHH:MM:SS+-HH:MM. Example:
Original file line number Diff line number Diff line change @@ -189,7 +189,7 @@ def test_success_send_with_inline_images():
189189 sp = SparkPost ('fake-key' )
190190
191191 image_data = {
192- "name" : "sparkpostdev.png " ,
192+ "name" : "sparkpostdev" ,
193193 "type" : "image/png" ,
194194 "filename" : image_path
195195 }
@@ -201,8 +201,8 @@ def test_success_send_with_inline_images():
201201 assert results == 'yay'
202202
203203 image_data = {
204- "name" : "test.txt " ,
205- "type" : "text/plain " ,
204+ "name" : "sparkpostdev " ,
205+ "type" : "image/png " ,
206206 "data" : encoded_image
207207 }
208208 results = sp .transmission .send (inline_images = [image_data ])
You can’t perform that action at this time.
0 commit comments