We have been using the Aspose.pdf cloud api to upload files for the past month. This evening, our PUT call has been failing with the following error code. There has been no change to the API Calls leaving the system, and the documents and contents are the same as yesterday when the PUT call successfully uploaded the documents.
Can you help us confirm why these are failing, has there been a recent change in the system?
{
“requestId”: “1142b2c3-a775-49b9-a190-509a17cc5eb8”,
“error”: {
“code”: “errorInvalidInputData”,
“message”: “: Failed to read the request form. Missing content-type boundary.”,
“description”: “Operation Failed. The input data is not valid.”,
“dateTime”: “2022-06-03T21:47:17.5692294Z”,
“innerError”: null
}
}
@mscitadmin
We are sorry for the inconvenience. The UploadFile API method is working fine at my end. Please share your sample code and input file with us. We will test the scenario and will guide you accordingly.
Thank you for the reply and support. It seems I am unable to upload a .JSON to this ticket so I have uploaded a .docx instead.
What I am most interested in is why the calls were working reliably for well over a month and suddenly began failing yesterday. Can you clarify which encoding formats are accepted by the API?
Faild Input.docx (218.5 KB)
I removed the “Content-Type”: “multipart/form-data” Header from the request and it seems to be functioning again.
Can you help me confirm if this fix will keep the solution stable moving forward? I don’t understand why the header did not cause issues prior to yesterday and am afraid that it may break suddenly again in the future.
@mscitadmin
Thanks for your feedback. We will investigate the issue and will share our findings with you soon.
@mscitadmin
I have tested the UploadFile API method using the following cURL command and unable to replicate the issue with multipart header. Please confirm, which REST Client are you using? And please share your sample working code. If it includes any confidential data, then you can share it via a private message.
curl -X PUT "https://api.aspose.cloud/v3.0/pdf/storage/file/02_pages.pdf"
-H "accept: application/json"
-H "authorization: Bearer [Access_Token]"
-H "Content-Type: multipart/form-data"
-H "x-aspose-client: Containerize.Swagger"
-F "File"="@C:/Temp/02_pages.pdf"