In the TalkJS Dashboard you have the ability to allow or forbid your users from sharing files. These attachments are tied to user Roles, meaning you can allow certain groups of users to send attachments, while forbidding others. See here:
TalkJS currently supports file and location attachments. These are all sent to and securely saved in our database. Some attachments may require the user's permission. This requires no extra code or work from your side except for setting the user's role. More information about setting roles can be found here notifications.
When attachment sharing is enabled the user will be able to add them to the chat by pressing the
+ icon next to the chatbox. You can try it out here: