We're sorry AsposeCloud doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.cloud

Example not working. Returning `ErrorInvalidInputData`

Hello Support,

I’m following the Words Cloud documentation and trying to execute the example: Compare|Documents (aspose.cloud) gives me ErrorInvalidInputData in both cURL and postman:

Request

curl -v "https://api.aspose.cloud/v4.0/words/online/put/compareDocument?destFileName=CompareDocumentOut.doc"      -X PUT      -H "Content-Type: multipart/form-data"      -H "Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE2NTgyNTA5NzAsImV4cCI6MTY1ODI1NDU3MCwiaXNzIjoiaHR0cHM6Ly9hcGkuYXNwb3NlLmNsb3VkIiwiYXVkIjpbImh0dHBzOi8vYXBpLmFzcG9zZS5jbG91ZC9yZXNvdXJjZXMiLCJhcGkuYmlsbGluZyIsImFwaS5pZGVudGl0eSIsImFwaS5wcm9kdWN0cyIsImFwaS5zdG9yYWdlIl0sImNsaWVudF9pZCI6IjYyZWQ2ZGU3LTI1OWYtNDc1ZC1iNjMxLTJiM2FkYmVmNzE2MiIsImNsaWVudF9kZWZhdWx0X3N0b3JhZ2UiOiI0ODBmNGQ0MC1lNzc3LTRkZDYtOGQzZC0zMjU2NTVhMDcyMWUiLCJjbGllbnRfaWRlbnRpdHlfdXNlcl9pZCI6Ijg5ODkwNyIsInNjb3BlIjpbImFwaS5iaWxsaW5nIiwiYXBpLmlkZW50aXR5IiwiYXBpLnByb2R1Y3RzIiwiYXBpLnN0b3JhZ2UiXX0.aQZ14L1d6veCM8WHcr7IPzAu5KRDdhWIxADUUeDnTi1oggB5WTkB6vtAQ2bxBQnNuvxu73OyLvovnWk5skgaEbmeejBBqxgPCccraOmD0HrDjEs9zMwyhEZq3rp-oOA9Mz0hDfHTrPCvo1F-z8d42mxS_VgBWTkG-7H8cDGmbjtaVRDiHEni2hmfQlVVyXoA8Zk8ZUvB06M3TcIItnuvBIsyB14BpfX5V6fiwAQrxGJ9bWnxhqkmsEI8iTSPvHSnxlD2Nt1ACa2ajfWWI4ukfpoWNjJmn7vEEXme4QcLc16l9AACuogBO4GkU__luC8VOXzfDEjXis6EArstFwx7iQ"      -F Document="@compareTestDoc1.doc"      -F ComparingDocument="@compareTestDoc2.doc"

cUrl

{
  "Error": {
    "Code": "ErrorInvalidInputData",
    "Message": "Can not deserialize string '��\u0011ࡱ\u001a�\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000>\u0000\u0003\u0000��\t\u0000\u0006\u0000\u0000\u0000...\u0016...",
    "Description": "Operation Failed. The input data is not valid."
  },
  "RequestId": "Root=1-62d6ebd3-0d1c3a37269a8ff675a03a11"
}

Postman

{
    "Error": {
        "Code": "ErrorInvalidInputData",
        "Message": "Can not deserialize string '��ࡱ�

How can I fix it?

Thank you

@developer.looplex

We are sorry for the inconvenience. We are investigating the CompareDocumentOnline cURL command. Meanwhile, you can use CompareDocument API method for the document comparison from Cloud storage.

curl -X PUT "https://api.aspose.cloud/v4.0/words/compareTestDoc1.doc/compareDocument?destFileName=Compare_output.doc" -H "accept: application/json" -H "Authorization: Bearer [Access_Token]" 
-H "Content-Type: application/json" 
-H "x-aspose-client: Containerize.Swagger" 
-d ""ComparingWithDocument":"compareTestDoc2.doc","Author":"author","DateTime":"2022-07-20T05:10:54.451Z","CompareOptions":{"IgnoreCaseChanges":true,"IgnoreTables":true,"IgnoreFields":true,"IgnoreFootnotes":true,"IgnoreComments":true,"IgnoreTextboxes":true,"IgnoreFormatting":true,"IgnoreHeadersAndFooters":true,"Target":"Current","AcceptAllRevisionsBeforeComparison":true}}"