MyPureCloud / knowledge-html-converter

This is a javascript library which can convert any html content to genesys cloud knowledge article content format which is a strict and genesys specific JSON structure.
MIT License
3 stars 1 forks source link

img tags do not support data:image/png;base64 #7

Open jm-nab opened 4 months ago

jm-nab commented 4 months ago

Example:

<img class="fr-fic fr-dii" data-fr-image-pasted="true" height="265" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAes...=="/>
tmelko-genesys commented 3 months ago

To specify this issue a bit more:

knowledge-html-converter leaves image src attributes intact and it is the knowledge api that rejects this content when creating/updating a document variation:

{
    "message": "Image url should be valid and start with https://",
    "code": "bad.request",
    "status": 400,
    "entityName": "Variation",
    "messageWithParams": "Image url should be valid and start with https://",
    "messageParams": {},
    "contextId": "e747ba05-5113-43af-b920-4a3a1ef428e8",
    "details": [],
    "errors": []
}

Currently it's not possible to create a document variation with an image where the image url is "data:....".

tmelko-genesys commented 3 months ago

We cannot allow large images to be embedded in the article content, so those should rather be uploaded, for example with using /api/v2/responsemanagement/responseassets/uploads. https://developer.genesys.cloud/organization/responsemanagement-apis