-2

How do I insert image object instead of image url in the below code?

payload ={ "headings": [ { "heading": head, "image": { "url": i } } ], "position": 1, "family": "presentation", "subtype": "image" }

AKSHAYAA VAIDYANATHAN
  • 2,715
  • 7
  • 30
  • 51

1 Answers1

1

Use the files parameter in that case, passing in a dictionary or sequence of tuples. See the POST Multiple Multipart-Encoded Files section of the documentation.