File sharing
You can allow or not allow your users to share files. To allow your users to share files, go to the Chat UI page in the TalkJS dashboard. In the 'Features' section, select the box 'Allow file sharing'.
All files that users share are securely saved in the TalkJS database. In some cases file sharing requires the user's permission. User permissions require no extra code or work from your side.
When file sharing is enabled, a user can share a file in the chat by pressing the paperclip icon in the message field. You can try it out here:
If you would like to allow file sharing only for one group of users but not others, create a separate role for each user group and adjust the file sharing settings per role.
To enable file uploads on Android, since version 0.7.0
of the TalkJS Flutter SDK you need to add the following inside the <Application>
tag of your app's AndroidManifext.xml
file:
1<provider2 android:name="com.talkjs.talkjs_flutter_inappwebview.InAppWebViewFileProvider"3 android:authorities="${applicationId}.flutter_inappwebview.fileprovider"4 android:exported="false"5 android:grantUriPermissions="true">6 <meta-data7 android:name="android.support.FILE_PROVIDER_PATHS"8 android:resource="@xml/provider_paths" />9</provider>