0

I need to send messages with attachments to the conference, also update messages for all users with an event.

Can somebody help me?

any example please

1 Answers1

0

It would help if you specify what you have tried so far with a code example as this would also tell whether you are using the REST API or JS SDK (or Node.js SDK).

I'll assume you are using the JS SDK.

To send attachments use the addTextItem API. As seen on that page the attachments attribute is a regular File object.

An example app with file upload is available at https://github.com/circuit/circuit-sdk/blob/master/examples/js/messaging.html and running live at https://rawgit.com/circuit/circuit-sdk/master/examples/js/messaging.html.

This example is listed on our examples page at https://circuit.github.io/jssdk.html

Note that if you are referring to Node.js SDK file upload see example https://github.com/circuit/node-sdk-example

I am not clear what you mean "also update messages for all users with an event". The event raised when sending a message (with or without attachment) is itemAdded.

Subscribe to it via:

client.addEventListener('itemAdded', evt => {
    console.log(evt);
});
Roger Urscheler
  • 774
  • 2
  • 6
  • 11
  • thanks for answer, i wil try with File object. and add event client.addEventListener('itemAdded', evt => { console.log(evt); }); – Desh Bourne Jul 10 '18 at 15:54
  • https://rawgit.com/circuit/circuit-sdk/master/examples/js/messaging.html we use the example app with fileupload but i can't see the attachments just the message – Desh Bourne Jul 10 '18 at 20:55