Skip to content

Commit

Permalink
875307: moved the review changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ragu thanigasalam committed Mar 8, 2024
1 parent 58b5c96 commit 9410945
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -384,23 +384,23 @@ private WDocument GetDocument(IFormCollection data)
[AcceptVerbs("Post")]
[HttpPost]
[EnableCors("AllowAllOrigins")]
[Route("Compare")]
[Route("CompareDocuments")]
public string CompareDocuments([FromBody] CompareParameter data)
{
if (data.OriginalFile == null || data.RevisedFile == null)
return null;
Stream stream = new MemoryStream();
data.OriginalFile.CopyTo(stream);
stream.Position = 0;
Stream stream1 = new MemoryStream();
data.RevisedFile.CopyTo(stream1);
stream1.Position = 0;
Stream originalDocumentStream = new MemoryStream();
data.OriginalFile.CopyTo(originalDocumentStream);
originalDocumentStream.Position = 0;
Stream revisedDocumentStream = new MemoryStream();
data.RevisedFile.CopyTo(revisedDocumentStream);
revisedDocumentStream.Position = 0;
string json = "";

using (WDocument originalDocument = new WDocument(stream, WFormatType.Docx))
using (WDocument originalDocument = new WDocument(originalDocumentStream, WFormatType.Docx))
{
//Load the revised document.
using (WDocument revisedDocument = new WDocument(stream1, WFormatType.Docx))
using (WDocument revisedDocument = new WDocument(revisedDocumentStream, WFormatType.Docx))
{
// Compare the original and revised Word documents.
originalDocument.Compare(revisedDocument);
Expand All @@ -417,7 +417,7 @@ public string CompareDocuments([FromBody] CompareParameter data)
[AcceptVerbs("Post")]
[HttpPost]
[EnableCors("AllowAllOrigins")]
[Route("CompareUrlFiles")]
[Route("CompareDocumentsFromUrl")]
public string CompareDocumentsFromUrl([FromBody] CompareUrlParameter data)
{
if (data.OriginalFilePath == null || data.RevisedFilePath == null)
Expand Down

0 comments on commit 9410945

Please sign in to comment.