You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Get started with Azure Communication Services UI Library to quickly integrate communication experiences into your applications. In this quickstart, learn how to integrate UI Library chat composites into an application and set up the experience for your app users.
16
+
Get started with Azure Communication Services UI Library to quickly integrate communication experiences into your applications. This article describes how to integrate UI Library chat composites into an application and set up the experience for your app users.
17
17
18
-
Azure Communication Services UI Library renders a full chat experience right in your application. It takes care of connecting to Azure Communication Services chat services and updates a participant's presence automatically. As a developer, you need to decide about where in your app's user experience you want the chat experience to start and create only the Azure Communication Services resources as required.
18
+
Azure Communication Services UI Library renders a full chat experience right in your application. It takes care of connecting to Azure Communication Services chat services and updates a participant's presence automatically. As a developer, you need to decide where in your app's user experience you want the chat experience to start and create only the Azure Communication Services resources as required.
Get the sample Android application for this [quickstart](https://github.com/Azure-Samples/communication-services-android-quickstarts/tree/main/ui-chat) in the open-source Azure Communication Services [UI Library for Android](https://github.com/Azure/communication-ui-library-android).
11
+
Get the sample Android application at [Azure Samples Android SDK for chat](https://github.com/Azure-Samples/communication-services-android-quickstarts/tree/main/ui-chat) in the open-source Azure Communication Services [UI Library for Android](https://github.com/Azure/communication-ui-library-android).
12
12
13
13
## Prerequisites
14
14
@@ -20,7 +20,7 @@ Get the sample Android application for this [quickstart](https://github.com/Azur
20
20
21
21
## Set up the project
22
22
23
-
Complete the following sections to set up the quickstart project.
23
+
Complete the following sections to set up the project.
Get the sample iOS application for this [quickstart](https://github.com/Azure-Samples/communication-services-ios-quickstarts/tree/main/ui-chat) in the open-source Azure Communication Services [UI Library for iOS](https://github.com/Azure/communication-ui-library-ios).
11
+
Get the sample iOS application at [Azure Samples iOS SDK for chat](https://github.com/Azure-Samples/communication-services-ios-quickstarts/tree/main/ui-chat) in the open-source Azure Communication Services [UI Library for iOS](https://github.com/Azure/communication-ui-library-ios).
12
12
13
13
## Prerequisites
14
14
@@ -38,7 +38,7 @@ In Xcode, create a new project.
38
38
39
39
### Install the package and dependencies
40
40
41
-
1. (Optional) For MacBook with M1, install and enable [Rosetta](https://support.apple.com/en-us/HT211861) in Xcode.
41
+
1. (Optional) For MacBook with M1, install, and enable [Rosetta](https://support.apple.com/en-us/HT211861) in Xcode.
42
42
43
43
1. In your project root directory, run `pod init` to create a Podfile. If you encounter an error, update [CocoaPods](https://guides.cocoapods.org/using/getting-started.html) to the current version.
Copy file name to clipboardExpand all lines: articles/communication-services/tutorials/file-sharing-tutorial-acs-chat.md
+19-19Lines changed: 19 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
-
title: Enable file sharing using UI Library and Azure Blob Storage in an Azure communication Chat
3
-
titleSuffix: An Azure Communication Services tutorial
4
-
description: Learn how to use Azure Communication Services with the UI Library to enable file sharing through chat using Azure Blob Storage.
2
+
title: Add file sharing in chat using UI Library and Azure Blob Storage
3
+
titleSuffix: An Azure Communication Services article
4
+
description: This article describes how to use Azure Communication Services with the UI Library to enable file sharing through chat using Azure Blob Storage.
In an Azure Communication Services Chat, we can enable file sharing between communication users. Note, Azure Communication Services Chat is different from the Teams Interoperability Chat ("Interop Chat"). If you want to enable file sharing in an Interop Chat, refer to[Add file sharing with UI Library in Teams Interoperability Chat](./file-sharing-tutorial-interop-chat.md).
20
+
In an Azure Communication Services Chat, we can enable file sharing between communication users. Azure Communication Services Chat is different from the Teams Interoperability Chat, or *Interop Chat*. If you want to enable file sharing in an Interop Chat, see[Add file sharing with UI Library in Teams Interoperability Chat](./file-sharing-tutorial-interop-chat.md).
21
21
22
-
In this tutorial, we're configuring the Azure Communication Services UI Library Chat Composite to enable file sharing. The UI Library Chat Composite provides a set of rich components and UI controls that can be used to enable file sharing. We're using Azure Blob Storage to enable the storage of the files that are shared through the chat thread.
22
+
This article describes how to configure the Azure Communication Services UI Library Chat Composite to enable file sharing. The UI Library Chat Composite provides a set of rich components and UI controls we can use to enable file sharing. We're using Azure Blob Storage to enable the storage of the files that are shared through the chat thread.
23
23
24
24
> [!IMPORTANT]
25
-
> Azure Communication Services doesn't provide a file storage service. You need to use your own file storage service for sharing files. For the purpose of this tutorial, we're using Azure Blob Storage.\*\*
25
+
> Azure Communication Services doesn't provide a file storage service. You need to use your own file storage service for sharing files. This tutorial describes how to use Azure Blob Storage.
26
26
27
27
## Download code
28
28
29
-
Access the full code for this tutorial on [GitHub](https://github.com/Azure-Samples/communication-services-javascript-quickstarts/tree/main/ui-library-filesharing-chat-composite). If you want to use file sharing using UI Components, reference [this sample](https://github.com/Azure-Samples/communication-services-javascript-quickstarts/tree/main/ui-library-filesharing-ui-components).
29
+
Access the full code for this tutorial at [UI Library Sample - File Sharing using UI Chat Composite](https://github.com/Azure-Samples/communication-services-javascript-quickstarts/tree/main/ui-library-filesharing-chat-composite). If you want to use file sharing using UI Components, see [UI Library Sample - File Sharing using UI Components](https://github.com/Azure-Samples/communication-services-javascript-quickstarts/tree/main/ui-library-filesharing-ui-components).
30
30
31
31
## Prerequisites
32
32
33
33
- An Azure account with an active subscription. For details, see [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
34
34
-[Visual Studio Code](https://code.visualstudio.com/) on one of the [supported platforms](https://code.visualstudio.com/docs/supporting/requirements#_platforms).
35
-
-[Node.js](https://nodejs.org/), Active LTS and Maintenance LTS versions (10.14.1 recommended). Use the `node --version` command to check your version.
35
+
-[Node.js](https://nodejs.org/), Active LTS, and Maintenance LTS versions (10.14.1 recommended). Use the `node --version` command to check your version.
36
36
- An active Communication Services resource and connection string. [Create a Communication Services resource](../quickstarts/create-communication-resource.md).
37
37
38
-
This tutorial assumes that you already know how to set up and run a Chat Composite. You can follow the [Chat Compositetutorial](https://azure.github.io/communication-ui-library/?path=/docs/composites-chatcomposite--docs) to learn how to set up and run a Chat Composite.
38
+
To use this article, you need to know how to set up and run a Chat Composite. For more information about how to set up and run a Chat Composite, see the [ChatComposite tutorial](https://azure.github.io/communication-ui-library/?path=/docs/composites-chatcomposite--docs).
39
39
40
40
## Overview
41
41
42
42
The UI Library Chat Composite supports file sharing by enabling developers to pass the URL to a hosted file that is sent through the Azure Communication Services chat service. The UI Library renders the attached file and supports multiple extensions to configure the look and feel of the file sent. More specifically, it supports the following features:
43
43
44
-
1. Attach file button for picking files through the OS File Picker
44
+
1. Attach file button for picking files through the OS File Picker.
45
45
2. Configure allowed file extensions.
46
46
3. Enable/disable multiple uploads.
47
47
4. File Icons for a wide variety of file types.
48
48
5. File upload/download cards with progress indicators.
49
49
6. Ability to dynamically validate each file upload and display errors on the UI.
50
-
7. Ability to cancel an upload and remove an uploaded file before it's sent.
50
+
7. Ability to cancel an upload and remove an uploaded file before sending.
The diagram shows a typical flow of a file sharing scenario for both upload and download. The section marked as `Client Managed` shows the building blocks where developers need to have them implemented.
53
+
The following diagram shows a typical flow of a file sharing scenario for both upload and download. The section marked as `Client Managed` shows the building blocks where developers need to implement them.
54
54
55
55

56
56
57
57
## Set up file storage using Azure Blob
58
58
59
59
You can follow the tutorial [Upload file to Azure Blob Storage with an Azure Function](/azure/developer/javascript/how-to/with-web-app/azure-function-file-upload) to write the backend code required for file sharing.
60
60
61
-
Once implemented, you can call this Azure Function inside the `handleAttachmentSelection` function to upload files to Azure Blob Storage. For the remaining of the tutorial, we assume you have generated the function using the tutorial for Azure Blob Storage linked previously.
61
+
Once implemented, you can call this Azure Function inside the `handleAttachmentSelection` function to upload files to Azure Blob Storage. For the remaining of the tutorial, we assume you generated the function using the tutorial for Azure Blob Storage linked previously.
62
62
63
63
### Securing your Azure Blob storage container
64
64
65
-
This tutorial assumes that your Azure blob storage container allows public access to the files you upload. Making your Azure storage containers public isn't recommended for real world production applications.
65
+
This article assumes that your Azure blob storage container allows public access to the files you upload. Making your Azure storage containers public isn't recommended for real world production applications.
66
66
67
-
For downloading the files, you upload to Azure blob storage, you can use shared access signatures (SAS). A shared access signature (SAS) provides secure delegated access to resources in your storage account. With a SAS, you have granular control over how a client can access your data.
67
+
For downloading the files, you upload to Azure blob storage. Then you can use shared access signatures (SAS). A shared access signature (SAS) provides secure delegated access to resources in your storage account. With a SAS, you have granular control over how a client can access your data.
68
68
69
69
The downloadable [GitHub sample](https://github.com/Azure-Samples/communication-services-javascript-quickstarts/tree/main/ui-library-filesharing-chat-composite) showcases the use of SAS for creating SAS URLs to Azure Storage contents. Additionally, you can [read more about SAS](../../storage/common/storage-sas-overview.md).
By default, the UI library will open a new tab pointing to the URL you have set when you `notifyUploadCompleted`. Alternatively, you can have a custom logic to handle attachment downloads via `actionsForAttachment`. Let's take a look of an example.
303
+
By default, the UI library opens a new tab pointing to the URL you set when you `notifyUploadCompleted`. Alternatively, you can use a custom logic to handle attachment downloads via `actionsForAttachment`. Let's take a look of an example.
If there were any issues during the download and the user needs to be notified, we can just `throw` an error with a message in the `onClick` function then the message would be shown in the error bar on top of the Chat Composite.
364
+
If there were any issues during the download and the user needs to be notified, you can `throw` an error with a message in the `onClick` function. Then the message displays in the error bar on top of the Chat Composite.
365
365
366
366

367
367
@@ -374,7 +374,7 @@ If you want to clean up and remove a Communication Services subscription, you ca
374
374
> [!div class="nextstepaction"]
375
375
> [Check the rest of the UI Library](https://azure.github.io/communication-ui-library/)
376
376
377
-
You may also want to:
377
+
## Related articles
378
378
379
379
- [Add chat to your app](../quickstarts/chat/get-started.md)
380
380
- [Creating user access tokens](../quickstarts/identity/access-tokens.md)
0 commit comments