Until now there have been no problems uploading docx files with the v1 API of Zoho CRM, but today I noticed that when trying to upload a file with docx contents, the upload fails with this message:
- Unable to process your request. Please verify whether you have entered proper method name,parameter and parameter values.
By the way I've tried changing the extension to .jpg, and I got the same failure. However, uploading an original jpg works fine, and even when changing the original jpg's extension to .docx, the upload still works.
Here is an example request with some data redacted:
POST /crm/private/xml/CustomModule3/uploadFile HTTP/1.1
Content-Type: multipart/form-data; boundary=0817f6baba7f20224487af6e1b0eecb3267443db
--0817f6baba7f20224487af6e1b0eecb3267443db
Content-Disposition: form-data; name="id"
(redacted Zoho ID)
--0817f6baba7f20224487af6e1b0eecb3267443db
Content-Disposition: form-data; name="content"; filename="nOoL6J8ntGnebN4nOWh2cbXSp1183EzC9gL0qEAD.docx"
Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document
(redacted file contents)
--0817f6baba7f20224487af6e1b0eecb3267443db
Content-Disposition: form-data; name="authtoken"
(redacted auth token)
--0817f6baba7f20224487af6e1b0eecb3267443db
Content-Disposition: form-data; name="scope"
crmapi
--0817f6baba7f20224487af6e1b0eecb3267443db--
And the response:
HTTP/1.1 200 OK
Server: ZGS
Date: Thu, 10 Jan 2019 23:06:25 GMT
Content-Type: text/xml;charset=utf-8
Content-Length: 282
Connection: keep-alive
Set-Cookie: (redacted)=(redacted); Path=/
Set-Cookie: crmcsr=(redacted uuid);path=/;Secure;priority=high
Set-Cookie: JSESSIONID=(redacted); Path=/; Secure
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Content-Disposition: attachment; filename=response.xml
Strict-Transport-Security: max-age=15768000
<?xml version="1.0" encoding="UTF-8" ?>
<response uri="/crm/private/xml/CustomModule3/uploadFile"><error><code>4600</code><message>Unable to process your request. Please verify whether you have entered proper method name,parameter and parameter values.</message></error></response>
EDIT: It appears that pdf files also fail to upload in the same way.