How do you upload an image and get the download link (using download api: GET /api/v2/downloads/{downloadId}
)?
Currently we have a application widget that has it's own RTE, now when we upload from local, it's url will look like this: blob:https://localhost/73dc3355-19ce-40b0-b2c1-e1ddc3af5e4a
, after uploading the image, we save the email as draft using the following endpoint: POST /api/v2/conversations/emails/{conversationId}/messages/draft
.
When we click the reply button on the genesys app (see pic below)
the image source is changed to: blob:https://apps.mypurecloud.ie/8580933b-f52e-45de-8317-7e821fe6ef4d
. Now when we send this email, the image is broken.
One thing I notice, when we upload the image directly from the genesys app RTE, the image has this link: https://api.mypurecloud.ie/api/v2/downloads/ed0341c5983cda5d
.
Now how do I replicate the upload process of the genesys app RTE with the widget app that we have?
I tried using the upload endpoint (/api/v2/uploads/publicassets/images
) but I don't see any downloadId
to use for the downloads endpoint.
(values are purposely deleted)
{
"url": "",
"fileUrl": "",
"uploadKey": "",
"headers": {
"x-amz-tagging": "",
"Content-MD5": "",
"x-amz-meta-organizationid": "",
"Content-Type": ""
}
}