diff --git a/Document-Processing/Word/Word-Processor/vue/saving-documents/google-cloud-storage.md b/Document-Processing/Word/Word-Processor/vue/saving-documents/google-cloud-storage.md index c31d11666f..0f93bf8f90 100644 --- a/Document-Processing/Word/Word-Processor/vue/saving-documents/google-cloud-storage.md +++ b/Document-Processing/Word/Word-Processor/vue/saving-documents/google-cloud-storage.md @@ -80,12 +80,25 @@ public void SaveToGoogleCloud(IFormCollection data) string bucketName = _bucketName; Stream stream = new MemoryStream(); - file.CopyTo(stream); + try + { + file.CopyTo(stream); + stream.Position = 0; - // Upload the document to Google Cloud Storage - _storageClient.UploadObject(bucketName, result + "_downloaded.docx", null, stream); + // Upload the document to Google Cloud Storage + _storageClient.UploadObject(bucketName, result + "_downloaded.docx", null, stream); + } + catch (Exception ex) + { + // Log or handle the upload failure (e.g., invalid credentials, bucket not found, permission denied) + throw; + } + finally + { + stream.Dispose(); + } -} +} private string GetValue(IFormCollection data, string key) { diff --git a/Document-Processing/Word/Word-Processor/vue/saving-documents/google-drive.md b/Document-Processing/Word/Word-Processor/vue/saving-documents/google-drive.md index b7d717c119..5e44b9a854 100644 --- a/Document-Processing/Word/Word-Processor/vue/saving-documents/google-drive.md +++ b/Document-Processing/Word/Word-Processor/vue/saving-documents/google-drive.md @@ -69,7 +69,7 @@ public DocumentEditorController(IWebHostEnvironment hostingEnvironment, IMemoryC public void SaveToGoogleDrive(IFormCollection data) { - if (data.Files.Count == 0) + if (data.Files.Count == 0) return; IFormFile file = data.Files[0]; @@ -192,7 +192,7 @@ On the client side, export the document to a blob using [`saveAsBlob`](https://e req.onreadystatechange = () => { if (req.readyState === 4) { if (req.status === 200 || req.status === 304) { - console.log('Saved sucessfully'); + console.log('Saved successfully'); } } }; diff --git a/Document-Processing/Word/Word-Processor/vue/saving-documents/one-drive.md b/Document-Processing/Word/Word-Processor/vue/saving-documents/one-drive.md index 80d30e7631..8972c04101 100644 --- a/Document-Processing/Word/Word-Processor/vue/saving-documents/one-drive.md +++ b/Document-Processing/Word/Word-Processor/vue/saving-documents/one-drive.md @@ -179,7 +179,7 @@ On the client side, export the document to a blob using [`saveAsBlob`](https://e req.onreadystatechange = () => { if (req.readyState === 4) { if (req.status === 200 || req.status === 304) { - console.log('Saved sucessfully'); + console.log('Saved successfully'); } } }; diff --git a/Document-Processing/Word/Word-Processor/vue/saving-documents/server-side-export.md b/Document-Processing/Word/Word-Processor/vue/saving-documents/server-side-export.md index 02d4b3a945..5e95f60128 100644 --- a/Document-Processing/Word/Word-Processor/vue/saving-documents/server-side-export.md +++ b/Document-Processing/Word/Word-Processor/vue/saving-documents/server-side-export.md @@ -12,15 +12,15 @@ domainurl: ##DomainURL## ## SFDT to DOCX export -Document Editor supports server-side export of **Syncfusion Document Text (.sfdt)** to Doc, DOCX, RTF, Txt, WordML, HTML formats using server-side helper `**Syncfusion.EJ2.DocumentEditor**` available in ASP.NET Core & ASP.NET MVC platform in the below NuGet's. +Document Editor supports server-side export of **Syncfusion Document Text (.sfdt)** to Doc, DOCX, RTF, Txt, WordML, HTML formats using server-side helper **Syncfusion.EJ2.DocumentEditor** available in ASP.NET Core & ASP.NET MVC platform in the NuGet packages below. * [Syncfusion.EJ2.WordEditor.AspNet.Core](https://www.nuget.org/packages/Syncfusion.EJ2.WordEditor.AspNet.Core) * [Syncfusion.EJ2.WordEditor.AspNet.Mvc5](https://www.nuget.org/packages/Syncfusion.EJ2.WordEditor.AspNet.Mvc5) * [Syncfusion.EJ2.WordEditor.AspNet.Mvc4](https://www.nuget.org/packages/Syncfusion.EJ2.WordEditor.AspNet.Mvc4) -Please refer the following code example. +Please refer to the following code example. -```c# +```csharp //API controller for the conversion. [HttpPost] public void ExportSFDT([FromBody]SaveParameter data) @@ -38,7 +38,7 @@ Please refer the following code example. } ``` -Please refer the client side example to serialize the sfdt and send to the server. +Please refer to the following client-side example to serialize the SFDT and send it to the server. {% tabs %} {% highlight html tabtitle="Composition API (~/src/App.vue)" %} @@ -57,7 +57,7 @@ import { DocumentEditorComponent as EjsDocumenteditor, Selection, Editor, SfdtEx import { provide, ref } from 'vue'; const documenteditor = ref(null); -//Inject require modules. +//Inject required modules. provide('DocumentEditor', [SfdtExport, WordExport, Selection, Editor]) const exportBlob = function () { @@ -99,7 +99,7 @@ export default { }; }, provide: { - //Inject require modules. + //Inject required modules. DocumentEditor: [SfdtExport, WordExport, Selection, Editor] }, methods: { @@ -123,4 +123,4 @@ export default { {% endhighlight %} {% endtabs %} -> DocumentEditor object is available in DocumentEditorContainer component(DocumentEditor packaged with toolbar, status bar & properties pane) as [`documentEditor`](https://ej2.syncfusion.com/vue/documentation/api/document-editor-container#documenteditor-code-classlanguage-textdocumenteditorcode) \ No newline at end of file +> DocumentEditor object is available in DocumentEditorContainer component(DocumentEditor packaged with toolbar, status bar & properties pane) as [`documentEditor`](https://ej2.syncfusion.com/vue/documentation/api/document-editor-container#documenteditor-code-classlanguage-textdocumenteditorcode)