diff --git a/Document-Processing/Word/Word-Processor/javascript-es6/saving-documents/azure-blob-storage.md b/Document-Processing/Word/Word-Processor/javascript-es6/saving-documents/azure-blob-storage.md index 8bc19b791c..75e9f132b2 100644 --- a/Document-Processing/Word/Word-Processor/javascript-es6/saving-documents/azure-blob-storage.md +++ b/Document-Processing/Word/Word-Processor/javascript-es6/saving-documents/azure-blob-storage.md @@ -1,22 +1,20 @@ --- layout: post -title: Save document to Azure Blob Storage in JavaScript (ES6) Document editor control | Syncfusion -description: Learn about how to Save document to Azure Blob Storage in JavaScript (ES6) Document editor control of Syncfusion Essential JS 2 and more details. +title: Save document to Azure Blob Storage in DOCX Editor | Syncfusion +description: Learn about how to save a document to Azure Blob Storage in the Syncfusion JavaScript (ES6) Document Editor of Essential JS 2 and more details. platform: document-processing control: Save document to Azure Blob Storage documentation: ug domainurl: ##DomainURL## --- -# Save document to Azure Blob Storage +# Save document to Azure Blob Storage in JavaScript (ES6) -To save a document to Azure Blob Storage, you can follow the steps below +To save a document to Azure Blob Storage, you can follow the steps below. - - -**Step 1:** Create a Simple Document Editor sample in TypeScript +**Step 1:** Create a Simple [TypeScript DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/javascript-docx-editor) (Document Editor) sample in TypeScript. -Follow the instructions provided in this [link](../getting-started) to create a simple Document Editor sample in Typescript. This will give you a basic setup of the [TypeScript DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/javascript-docx-editor) (Document Editor) component. +Follow the instructions provided in this [link](../getting-started) to create a simple Document Editor sample in TypeScript. This will give you a basic setup of the Document Editor component. **Step 2:** Modify the `DocumentEditorController.cs` File in the Web Service Project @@ -32,7 +30,7 @@ using Azure.Storage.Blobs; using Azure.Storage.Blobs.Specialized; ``` -* Add the following private fields and constructor parameters to the `DocumentEditorController` class, In the constructor, assign the values from the configuration to the corresponding fields +* Add the following private fields and constructor parameters to the `DocumentEditorController` class. In the constructor, assign the values from the configuration to the corresponding fields. ```csharp private readonly string _storageConnectionString; @@ -47,16 +45,16 @@ public DocumentEditorController(IConfiguration configuration, ILogger Replace **Your Connection string from Azure** with the actual connection string for your Azure Blob Storage account and **Your container name in Azure** with the actual container name +N> Replace **Your Connection string from Azure** with the actual connection string for your Azure Blob Storage account and **Your container name in Azure** with the actual container name. -**Step 3:** Modify the index File in the Document Editor sample +**Step 3:** Modify the index file in the Document Editor sample -In the client-side, to export the document into blob the document using [`saveAsBlob`](https://ej2.syncfusion.com/documentation/api/document-editor#saveAsBlob) and sent to server-side for saving in Azure Blob Storage container. +On the client side, export the document to a blob using [`saveAsBlob`](https://ej2.syncfusion.com/documentation/api/document-editor#saveAsBlob) and send it to the server side for saving in the Azure Blob Storage container. diff --git a/Document-Processing/Word/Word-Processor/javascript-es6/saving-documents/box-cloud-file-storage.md b/Document-Processing/Word/Word-Processor/javascript-es6/saving-documents/box-cloud-file-storage.md index 3adddd2c22..a5c52b1d5a 100644 --- a/Document-Processing/Word/Word-Processor/javascript-es6/saving-documents/box-cloud-file-storage.md +++ b/Document-Processing/Word/Word-Processor/javascript-es6/saving-documents/box-cloud-file-storage.md @@ -1,26 +1,28 @@ --- layout: post -title: Save document to Box cloud file storage in JavaScript (ES6) Document editor control | Syncfusion -description: Learn about how to Save document to Box cloud file storage in JavaScript (ES6) Document editor control of Syncfusion Essential JS 2 and more details. +title: Save document to Box cloud file storage in DOCX Editor | Syncfusion +description: Learn how to save a document to Box cloud file storage in the Syncfusion JavaScript (ES6) Document Editor of Essential JS 2 and more details. platform: document-processing control: Save document to Box cloud file storage documentation: ug domainurl: ##DomainURL## --- -# Save document to Box cloud file storage +# Save document to Box cloud file storage in JavaScript (ES6) -To save a document to Box cloud file storage, you can follow the steps below +To save a document to Box cloud file storage, you can follow the steps below. **Step 1:** Set up a Box developer account and create a Box application -To access Box storage programmatically, you'll need a developer account with Box. Go to the [Box Developer Console](https://developer.box.com/), sign in or create a new account, and then create a new Box application. This application will provide you with the necessary credentials Client ID and Client Secret to authenticate and access Box APIs. Before accessing files, you need to authenticate your application to access your Box account. Box API supports `OAuth 2.0 authentication` for this purpose. +To access Box storage programmatically, you'll need a developer account with Box. Go to the [Box Developer Console](https://developer.box.com/), sign in or create a new account, and then create a new Box application. This application will provide you with the necessary credentials — Client ID and Client Secret — to authenticate and access Box APIs. + +N> 1. Before accessing files, you need to authenticate your application to access your Box account. Box API supports `OAuth 2.0 authentication` for this purpose. **Step 2:** Create a Simple Document Editor sample in TypeScript -Follow the instructions provided in this [link](../getting-started) to create a simple Document Editor sample in Typescript. This will give you a basic setup of the Document Editor component. +Follow the instructions provided in this [link](../getting-started) to create a simple Document Editor sample in TypeScript. This will give you a basic setup of the Document Editor component. @@ -41,7 +43,7 @@ using Box.V2.Config; using Box.V2.Models; ``` -* Add the following private fields and constructor parameters to the `DocumentEditorController` class, In the constructor, assign the values from the configuration to the corresponding fields +* Add the following private fields and constructor parameters to the `DocumentEditorController` class. In the constructor, assign the values from the configuration to the corresponding fields. ```csharp private IConfiguration _configuration; @@ -69,9 +71,9 @@ public DocumentEditorController(IWebHostEnvironment hostingEnvironment, IMemoryC [HttpPost] [EnableCors("AllowAllOrigins")] [Route("SaveToBoxCloud")] -//Post action for downloading the document +//Post action for uploading the document to Box -public void SaveToBoxCloud(IFormCollection data) +public async Task SaveToBoxCloud(IFormCollection data) { if (data.Files.Count == 0) return; @@ -93,6 +95,7 @@ public void SaveToBoxCloud(IFormCollection data) Stream stream = new MemoryStream(); file.CopyTo(stream); + stream.Position = 0; var boxFile = await client.FilesManager.UploadAsync(fileRequest, stream); } @@ -111,7 +114,7 @@ private string GetValue(IFormCollection data, string key) } ``` -* Open the `appsettings.json` file in your web service project, Add the following lines below the existing `"AllowedHosts"` configuration +* Open the `appsettings.json` file in your web service project. Add the following lines below the existing `"AllowedHosts"` configuration. ```json { @@ -131,9 +134,9 @@ private string GetValue(IFormCollection data, string key) N> replace **Your_Box_Storage_Access_Token** with your actual box access token, and **Your_Folder_ID** with the ID of the folder in your box storage where you want to perform specific operations. Remember to use your valid box API credentials, as **Your_Box_Storage_ClientID** and **Your_Box_Storage_ClientSecret"** are placeholders for your application's API key and secret. -**Step 4:** Modify the index File in the Document Editor sample +**Step 4:** Modify the index file in the Document Editor sample -In the client-side, to export the document into blob the document using [`saveAsBlob`](https://ej2.syncfusion.com/documentation/api/document-editor#saveAsBlob) and sent to server-side for saving in Box cloud file storage. +On the client side, export the document to a blob using [`saveAsBlob`](https://ej2.syncfusion.com/documentation/api/document-editor#saveAsBlob) and send it to the server side for saving in Box cloud file storage. diff --git a/Document-Processing/Word/Word-Processor/javascript-es6/saving-documents/dropbox-cloud-file-storage.md b/Document-Processing/Word/Word-Processor/javascript-es6/saving-documents/dropbox-cloud-file-storage.md index 4ea6ead7ab..fb87631dc9 100644 --- a/Document-Processing/Word/Word-Processor/javascript-es6/saving-documents/dropbox-cloud-file-storage.md +++ b/Document-Processing/Word/Word-Processor/javascript-es6/saving-documents/dropbox-cloud-file-storage.md @@ -1,26 +1,26 @@ --- layout: post -title: Save document to Dropbox cloud file storage in JavaScript (ES6) Document editor control | Syncfusion -description: Learn about how to Save document to Dropbox cloud file storage in JavaScript (ES6) Document editor control of Syncfusion Essential JS 2 and more details. +title: Save document to Dropbox in DOCX Editor | Syncfusion +description: Learn how to save a document to Dropbox cloud file storage in the Syncfusion JavaScript (ES6) Document Editor of Essential JS 2 and more details. platform: document-processing control: Save document to Dropbox cloud file storage documentation: ug domainurl: ##DomainURL## --- -# Save document to Dropbox cloud file storage +# Save document to Dropbox cloud file storage in JavaScript (ES6) -To save a document to Dropbox cloud file storage, you can follow the steps below +To save a document to Dropbox cloud file storage, you can follow the steps below. -**Step 1:** Create a Dropbox API +**Step 1:** Create a Dropbox API app -To create a Dropbox API App, you should follow the official documentation provided by Dropbox [link](https://www.dropbox.com/developers/documentation/dotnet#tutorial). The process involves visiting the Dropbox Developer website and using their App Console to set up your API app. This app will allow you to interact with Dropbox programmatically, enabling secure access to files and data. +To create a Dropbox API App, you should follow the official [Dropbox .NET tutorial](https://www.dropbox.com/developers/documentation/dotnet#tutorial) provided by Dropbox. The process involves visiting the Dropbox Developer website and using their App Console to set up your API app. This app will allow you to interact with Dropbox programmatically, enabling secure access to files and data. **Step 2:** Create a Simple Document Editor sample in TypeScript -Follow the instructions provided in this [link](../getting-started) to create a simple Document Editor sample in Typescript. This will give you a basic setup of the Document Editor component. +Follow the instructions provided in this [link](../getting-started) to create a simple Document Editor sample in TypeScript. This will give you a basic setup of the Document Editor component. **Step 3:** Modify the `DocumentEditorController.cs` File in the Web Service Project @@ -38,7 +38,7 @@ using Dropbox.Api; using Dropbox.Api.Files; ``` -* Add the following private fields and constructor parameters to the `DocumentEditorController` class, In the constructor, assign the values from the configuration to the corresponding fields +* Add the following private fields and constructor parameters to the `DocumentEditorController` class. In the constructor, assign the values from the configuration to the corresponding fields. ```csharp private IConfiguration _configuration; @@ -63,9 +63,9 @@ public DocumentEditorController(IWebHostEnvironment hostingEnvironment, IMemoryC [HttpPost] [EnableCors("AllowAllOrigins")] [Route("SaveToDropBox")] -//Post action for downloading the document +//Post action for uploading the document to Dropbox -public void SaveToDropBox(IFormCollection data) +public async Task SaveToDropBox(IFormCollection data) { if (data.Files.Count == 0) return; @@ -79,6 +79,7 @@ public void SaveToDropBox(IFormCollection data) { Stream stream = new MemoryStream(); file.CopyTo(stream); + stream.Position = 0; // Upload the document to Dropbox var uploadedFile = await dropBox.Files.UploadAsync( @@ -103,7 +104,7 @@ private string GetValue(IFormCollection data, string key) } ``` -* Open the `appsettings.json` file in your web service project, Add the following lines below the existing `"AllowedHosts"` configuration +* Open the `appsettings.json` file in your web service project. Add the following lines below the existing `"AllowedHosts"` configuration. ```json { @@ -121,9 +122,9 @@ private string GetValue(IFormCollection data, string key) N> Replace **Your_Dropbox_Access_Token** with your actual Dropbox access token and **Your_Folder_Name** with your folder name. -**Step 4:** Modify the index File in the Document Editor sample +**Step 4:** Modify the index file in the Document Editor sample -In the client-side, to export the document into blob the document using [`saveAsBlob`](https://ej2.syncfusion.com/documentation/api/document-editor#saveAsBlob) and sent to server-side for saving in Dropbox cloud file storage. +On the client side, export the document to a blob using [`saveAsBlob`](https://ej2.syncfusion.com/documentation/api/document-editor#saveAsBlob) and send it to the server side for saving in Dropbox cloud file storage. diff --git a/Document-Processing/Word/Word-Processor/javascript-es6/saving-documents/google-cloud-storage.md b/Document-Processing/Word/Word-Processor/javascript-es6/saving-documents/google-cloud-storage.md index 3eb05acfca..4e39ba3c1f 100644 --- a/Document-Processing/Word/Word-Processor/javascript-es6/saving-documents/google-cloud-storage.md +++ b/Document-Processing/Word/Word-Processor/javascript-es6/saving-documents/google-cloud-storage.md @@ -1,22 +1,20 @@ --- layout: post -title: Save document to Google Cloud Storage in JavaScript (ES6) Document editor control | Syncfusion -description: Learn about how to Save document to Google Cloud Storage in JavaScript (ES6) Document editor control of Syncfusion Essential JS 2 and more details. +title: Save document to Google Cloud Storage in DOCX Editor | Syncfusion +description: Learn how to save a document to Google Cloud Storage in the Syncfusion JavaScript (ES6) Document Editor of Essential JS 2 and more details. platform: document-processing control: Save document to Google Cloud Storage documentation: ug domainurl: ##DomainURL## --- -# Save document to Google Cloud Storage +# Save document to Google Cloud Storage in JavaScript (ES6) -To save a document to Google Cloud Storage, you can follow the steps below +To save a document to Google Cloud Storage, you can follow the steps below. - - -**Step 1:** Create a Simple Document Editor sample in TypeScript +**Step 1:** Create a Simple [TypeScript DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/javascript-docx-editor) (Document Editor) sample in TypeScript -Follow the instructions provided in this [link](../getting-started) to create a simple Document Editor sample in Typescript. This will give you a basic setup of the [TypeScript DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/javascript-docx-editor) (Document Editor) component. +Follow the instructions provided in this [link](../getting-started) to create a simple Document Editor sample in TypeScript. This will give you a basic setup of the Document Editor component. **Step 2:** Create the `DocumentEditorController.cs` File in the Web Service Project @@ -34,7 +32,7 @@ using Google.Cloud.Storage.V1; using Google.Apis.Auth.OAuth2; ``` -* Add the following private fields and constructor parameters to the `DocumentEditorController` class, In the constructor, assign the values from the configuration to the corresponding fields +* Add the following private fields and constructor parameters to the `DocumentEditorController` class. In the constructor, assign the values from the configuration to the corresponding fields. ```csharp // Private readonly object _storageClient @@ -71,7 +69,7 @@ public DocumentEditorController(IWebHostEnvironment hostingEnvironment, IMemoryC [HttpPost] [EnableCors("AllowAllOrigins")] [Route("SaveToGoogleCloud")] -//Post action for downloading the document +//Post action for uploading the document to Google Cloud Storage public void SaveToGoogleCloud(IFormCollection data) { if (data.Files.Count == 0) @@ -105,7 +103,7 @@ private string GetValue(IFormCollection data, string key) } ``` -* Open the `appsettings.json` file in your web service project, Add the following lines below the existing `"AllowedHosts"` configuration +* Open the `appsettings.json` file in your web service project. Add the following lines below the existing `"AllowedHosts"` configuration. ```json { @@ -120,13 +118,13 @@ private string GetValue(IFormCollection data, string key) } ``` -N> Replace **Your Bucket name from Google Cloud Storage** with the actual name of your Google Cloud Storage bucket +N> Replace **Your Bucket name from Google Cloud Storage** with the actual name of your Google Cloud Storage bucket. N> Replace **path/to/service-account-key.json** with the actual file path to your service account key JSON file. Make sure to provide the correct path and filename. -**Step 4:** Modify the index File in the Document Editor sample +**Step 4:** Modify the index file in the Document Editor sample -In the client-side, to export the document into blob the document using [`saveAsBlob`](https://ej2.syncfusion.com/documentation/api/document-editor#saveAsBlob) and sent to server-side for saving in Google Cloud Storage. +On the client side, export the document to a blob using [`saveAsBlob`](https://ej2.syncfusion.com/documentation/api/document-editor#saveAsBlob) and send it to the server side for saving in Google Cloud Storage. diff --git a/Document-Processing/Word/Word-Processor/javascript-es6/saving-documents/one-drive.md b/Document-Processing/Word/Word-Processor/javascript-es6/saving-documents/one-drive.md index 2320f3f29f..5d0dbcc620 100644 --- a/Document-Processing/Word/Word-Processor/javascript-es6/saving-documents/one-drive.md +++ b/Document-Processing/Word/Word-Processor/javascript-es6/saving-documents/one-drive.md @@ -1,26 +1,26 @@ --- layout: post -title: Save document to One Drive in JavaScript (ES6) Document editor control | Syncfusion -description: Learn about how to Save document to One Drive in JavaScript (ES6) Document editor control of Syncfusion Essential JS 2 and more details. +title: Save document to OneDrive in JavaScript (ES6) DOCX Editor | Syncfusion +description: Learn how to save a document to OneDrive in the Syncfusion JavaScript (ES6) Document Editor of Essential JS 2 and more details. platform: document-processing -control: Save document to One Drive +control: Save document to OneDrive documentation: ug domainurl: ##DomainURL## --- -# Save document to One Drive +# Save document to OneDrive in JavaScript (ES6) -To save a document to One Drive, you can follow the steps below +To save a document to OneDrive, you can follow the steps below. -**Step 1:** Create the Microsoft graph API. +**Step 1:** Create the Microsoft Graph API. -Need to create a Microsoft Graph API application and obtain the necessary credentials, namely the application ID and tenant ID. Follow the steps provided in the [link](https://learn.microsoft.com/en-us/training/modules/msgraph-access-file-data/3-exercise-access-files-onedrive) to create the application and obtain the required IDs. +You must create a Microsoft Graph API application and obtain the necessary credentials, namely the application ID and tenant ID. Follow the steps provided in the [link](https://learn.microsoft.com/en-us/training/modules/msgraph-access-file-data/3-exercise-access-files-onedrive) to create the application and obtain the required IDs. -**Step 2:** Create a Simple Document Editor sample in TypeScript +**Step 2:** Create a Simple Document Editor sample in TypeScript -Follow the instructions provided in this [link](../getting-started) to create a simple Document Editor sample in Typescript. This will give you a basic setup of the Document Editor component. +Follow the instructions provided in this [link](../getting-started) to create a simple Document Editor sample in TypeScript. This will give you a basic setup of the Document Editor component. **Step 3:** Modify the `DocumentEditorController.cs` File in the Web Service Project @@ -39,7 +39,7 @@ using Microsoft.Identity.Client; using Helpers; ``` -* Add the following private fields and constructor parameters to the `DocumentEditorController` class, In the constructor, assign the values from the configuration to the corresponding fields +* Add the following private fields and constructor parameters to the `DocumentEditorController` class. In the constructor, assign the values from the configuration to the corresponding fields. ```csharp private IConfiguration _configuration; @@ -58,14 +58,14 @@ public DocumentEditorController(IWebHostEnvironment hostingEnvironment, IMemoryC } ``` -* Create the `SaveToOneDrive()` method to save the downloaded document to One Drive bucket +* Create the `SaveToOneDrive()` method to save the downloaded document to OneDrive. ```csharp [AcceptVerbs("Post")] [HttpPost] [EnableCors("AllowAllOrigins")] [Route("SaveToOneDrive")] -//Post action for downloading the document +//Post action for uploading the document to OneDrive public void SaveToOneDrive(IFormCollection data) { @@ -119,7 +119,7 @@ private string GetValue(IFormCollection data, string key) } ``` -* Open the `appsettings.json` file in your web service project, Add the following lines below the existing `"AllowedHosts"` configuration +* Open the `appsettings.json` file in your web service project. Add the following lines below the existing `"AllowedHosts"` configuration. ```json { @@ -137,11 +137,11 @@ private string GetValue(IFormCollection data, string key) ``` -N> Replace **Your_Tenant_ID**, **Your_Application_ID**, and **Your_Folder_Name_To_Access_The_Files_In_Onedrive** with your actual tenant ID, application ID, and folder name. +N> Replace **Your_Tenant_ID**, **Your_Application_ID**, and **Your_Folder_Name_To_Access_The_Files_In_OneDrive** with your actual tenant ID, application ID, and folder name. -**Step 4:** Modify the index File in the Document Editor sample +**Step 4:** Modify the index file in the Document Editor sample -In the client-side, to export the document into blob the document using [`saveAsBlob`](https://ej2.syncfusion.com/documentation/api/document-editor#saveAsBlob) and sent to server-side for saving in One Drive. +On the client side, export the document to a blob using [`saveAsBlob`](https://ej2.syncfusion.com/documentation/api/document-editor#saveAsBlob) and send it to the server side for saving in OneDrive. @@ -154,7 +154,7 @@ In the client-side, to export the document into blob the document using [`saveAs {% endhighlight %} {% endtabs %} -N> The following NuGet packages are required to use the previous code example +N> The following NuGet packages are required to use the previous code example: * **Microsoft.Identity.Client** * **Microsoft.Graph** * **Microsoft.Extensions.Configuration**