Web deployment fileUpload configuration

I am making use of your headless mode for web messenger to build a custom UI. I would like to honor file attachment settings that are set in the deployment configuration but what I see in the config.json object doesn't seem to quite match what's in the documentation.

The documentation here: https://developer.genesys.cloud/commdigital/digital/webmessaging/webdeployments-apis#post-api-v2-webdeployments-configurations says that there should be a messenger.fileUpload.enableAttachments property that indicates if file attachments are enabled. However, this property does not seem to exist. I do see the modes property and what it contains changes depending on if attachments are enabled. Basically the modes object is empty if attachments are not enabled. So should I just rely on the modes objects instead of enableAttachments.

With attachments enabled:

"fileUpload": {
  "modes": [
    {
      "fileTypes": [
        "image/png",
        "image/jpeg",
        "image/gif"
      ],
      "maxFileSizeKB": 10240
    }
  ]
},

with attachments disabled:

"fileUpload": {
  "modes": [
    {
      "fileTypes": [],
      "maxFileSizeKB": 0
    }
  ]
},

Is this a bug in the API or in the documentation? And if I should rely on modes, what is the modes property an array of? Would there ever be more than one mode?

Hi @dlundin,

Yes, you should rely on modes array in config.json to check if attachments are enabled. When enabled, it will contain the list of allowed file types, when disabled it will be empty.

Messenger deployment configuration sample documentation here.

I think the Webdeployment configuration documentation should be corrected to not reflect the other 2 properties. I'm following up with the team in that matter, please disregard those properties.

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