symphonyoss / symphony-java-client

Java client library for Symphony

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Create Message only allows one file attachment

manucaicedo opened this issue · comments

In MessagesApi.java

public V4Message v4StreamSidMessageCreatePost(String sid, String sessionToken, String keyManagerToken, String message, String data, String version, File attachment, File preview)

Create message only allows a single File even though the api allows for multiple files by sending more than one attachment parameters to the form
For example in curl it would look like this:

curl --request POST --url 'https://PODNAME.symphony.com/agent/v4/stream/CONVERSATION-ID/message/create' --header 'cache-control: no-cache' --header 'content-type: multipart/form-data' --header 'keymanagertoken: KEY_MANAGER_TOKEN' --header 'sessiontoken: SESSION_TOKEN' -F 'message=@message2.txt'
-F 'attachment=@/home/karlmoll/file.jpg'
-F 'attachment=@/home/karlmoll/file2.jpg'

I believe this is a problem in the REST API Spec

 - name: attachment
      description: Optional file attachment.
      in: formData
      type: file
      required: false