Legacy Dev Forum Posts

 View Only

Sign Up

How to upload and download images

  • 1.  How to upload and download images

    Posted 06-05-2025 18:04

    joemorcullo8 | 2024-07-16 07:16:28 UTC | #1

    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": ""
        }
    }

    system | 2024-08-14 09:31:48 UTC | #2

    This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 27240