Skip to content

Commit 2d23825

Browse files
Merge pull request #251323 from jpeng-ms/patch-6
[ACS][Chat] Updated broken link
2 parents a98b62c + 19c0949 commit 2d23825

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

articles/communication-services/tutorials/file-sharing-tutorial.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ ms.subservice: chat
1717

1818
[!INCLUDE [Public Preview Notice](../includes/public-preview-include.md)]
1919

20-
In this tutorial, we'll be 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 will be leveraging Azure Blob Storage to enable the storage of the files that are shared through the chat thread.
20+
In this tutorial, we are 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 are using Azure Blob Storage to enable the storage of the files that are shared through the chat thread.
2121

2222
>[!IMPORTANT]
23-
>Azure Communication Services doesn't provide a file storage service. You will need to use your own file storage service for sharing files. For the pupose of this tutorial, we will be using Azure Blob Storage.**
23+
>Azure Communication Services doesn't provide a file storage service. You need to use your own file storage service for sharing files. For the pupose of this tutorial, we are be using Azure Blob Storage.**
2424
>
25-
> This tutorial is about file sharing between ACS users in an ACS Chat. For file sharing in a Teams interoperability chat, see the documentation in the [Storybook](https://azure.github.io/communication-ui-library/?path=/docs/examples-teamsinterop-filesharing--file-sharing). Note that for Teams Interoperability chat, we only support ACS users to receive file attachments from Teams users at this time. See [Web UI library use cases](../concepts/ui-library/ui-library-use-cases.md) for more information.
25+
> This tutorial is about file sharing between Azure Communication Services end user in an Azure Communication Services Chat. For file sharing in a Teams interoperability chat, see the documentation in our storybook for [Adding file sharing in Teams Interop Chat](https://azure.github.io/communication-ui-library/?path=/docs/composites-call-with-chat-basicexample--basic-example#in-teams-interop-meeting-chat-thread). Note that for Teams Interoperability chat, we only support Azure Communication Services end user to receive file attachments from Teams users at this time. See [Web UI library use cases](../concepts/ui-library/ui-library-use-cases.md) for more information.
2626
2727
## Download code
2828

@@ -50,15 +50,15 @@ The UI Library Chat Composite supports file sharing by enabling developers to pa
5050
7. Ability to cancel an upload and remove an uploaded file before it is sent.
5151
8. View uploaded files in MessageThread, download them. Allows asynchronous downloads.
5252

53-
The diagram below shows a typical flow of a file sharing scenario for both upload and download. The section marked as `Client Managed` shows the building blocks that need to be implemented by developers.
53+
This 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 that need to be implemented by developers.
5454

5555
![Filesharing typical flow](./media/filesharing-typical-flow.png "Diagram that shows the the file sharing typical flow.")
5656

5757
## Setup File Storage using Azure Blob
5858

5959
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.
6060

61-
Once implemented, you can call this Azure Function inside the `uploadHandler` function to upload files to Azure Blob Storage. For the remaining of the tutorial, we will assume you have generated the function using the tutorial for Azure Blob Storage linked above.
61+
Once implemented, you can call this Azure Function inside the `uploadHandler` 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 above.
6262

6363
### Securing your Azure Blob Storage Container
6464

@@ -68,11 +68,11 @@ For downloading the files you upload to Azure blob storage, you can use shared a
6868

6969
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).
7070

71-
UI Library requires a React environment to be setup. Next we will do that. If you already have a React App, you can skip this section.
71+
UI Library requires a React environment to be setup. Next we do that. If you already have a React App, you can skip this section.
7272

7373
### Set Up React App
7474

75-
We'll use the create-react-app template for this quickstart. For more information, see: [Get Started with React](https://reactjs.org/docs/create-a-new-react-app.html)
75+
We use the create-react-app template for this quickstart. For more information, see: [Get Started with React](https://reactjs.org/docs/create-a-new-react-app.html)
7676

7777
```bash
7878

@@ -83,7 +83,7 @@ cd ui-library-quickstart-composites
8383
```
8484

8585
At the end of this process, you should have a full application inside of the folder `ui-library-quickstart-composites`.
86-
For this quickstart, we'll be modifying files inside of the `src` folder.
86+
For this quickstart, we are modifying files inside of the `src` folder.
8787

8888
### Install the Package
8989

@@ -117,7 +117,7 @@ npm run start
117117

118118
## Configuring Chat Composite to enable File Sharing
119119

120-
You will need to replace the variable values for both common variable required to initialize the chat composite.
120+
You need to replace the variable values for both common variable required to initialize the chat composite.
121121

122122
`App.tsx`
123123

@@ -205,7 +205,7 @@ const fileUploadHandler: FileUploadHandler = async (userId, fileUploads) => {
205205

206206
const uploadFileToAzureBlob = async (fileUpload: FileUploadManager) => {
207207
// You need to handle the file upload here and upload it to Azure Blob Storage.
208-
// Below you can find snippets for how to configure the upload
208+
// This is a code snippet for how to configure the upload
209209
// Optionally, you can also update the file upload progress.
210210
fileUpload.notifyUploadProgressChanged(0.2);
211211
return {
@@ -224,7 +224,7 @@ const fileDownloadHandler: FileDownloadHandler = async (userId, fileData) => {
224224

225225
## Configure upload method to use Azure Blob Storage
226226

227-
To enable Azure Blob Storage upload, we will modify the `uploadFileToAzureBlob` method we declared above with the following code. You will need to replace the Azure Function information below to enable to upload.
227+
To enable Azure Blob Storage upload, we need to modify the `uploadFileToAzureBlob` method we declared above with the following code. You need to replace the Azure Function information below to enable to upload.
228228

229229
`App.tsx`
230230

@@ -276,7 +276,7 @@ const uploadFileToAzureBlob = async (fileUpload: FileUploadManager) => {
276276

277277
## Error Handling
278278

279-
When an upload fails, the UI Library Chat Composite will display an error message.
279+
When an upload fails, the UI Library Chat Composite would display an error message.
280280

281281
![File Upload Error Bar](./media/file-too-big.png "Screenshot that shows the File Upload Error Bar.")
282282

@@ -300,7 +300,7 @@ const fileUploadHandler: FileUploadHandler = async (userId, fileUploads) => {
300300

301301
## File Downloads - Advanced Usage
302302

303-
By default, the file `url` provided through `notifyUploadCompleted` method will be used to trigger a file download. However, if you need to handle a download in a different way, you can provide a custom `downloadHandler` to ChatComposite. Below we will modify the `fileDownloadHandler` that we declared above to check for an authorized user before allowing to download the file.
303+
By default, the file `url` provided through `notifyUploadCompleted` method need be used to trigger a file download. However, if you need to handle a download in a different way, you can provide a custom `downloadHandler` to ChatComposite. Below we need to modify the `fileDownloadHandler` that we declared above to check for an authorized user before allowing to download the file.
304304

305305
`App.tsx`
306306

@@ -313,7 +313,7 @@ const isUnauthorizedUser = (userId: string): boolean => {
313313

314314
const fileDownloadHandler: FileDownloadHandler = async (userId, fileData) => {
315315
if (isUnauthorizedUser(userId)) {
316-
// Error message will be displayed to the user.
316+
// Error message to be displayed to the user.
317317
return { errorMessage: 'You don’t have permission to download this file.' };
318318
} else {
319319
// If this function returns a Promise that resolves a URL string,
@@ -323,7 +323,7 @@ const fileDownloadHandler: FileDownloadHandler = async (userId, fileData) => {
323323
}
324324
```
325325

326-
Download errors will be displayed to users in an error bar on top of the Chat Composite.
326+
Download error message shown in an error bar on top of the Chat Composite.
327327

328328
![File Download Error](./media/download-error.png "Screenshot that shows the File Download Error.")
329329

0 commit comments

Comments
 (0)