Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team,
I am trying to upload a document (.Doc,.Docx,pdg,msg) on servicenow URL using REST client component with POST method in Talend (version: 7.3.1) .
with below setting few documents are successfully getting uploaded on servicenow URL using below setting in REST component.
tREST :
URL : Servicenow URL "/api/now/attachment/file?table_name="+context.TableName+"&table_sys_id="+((String)globalMap.get("TABLE_SYS_ID"))+"&file_name="+((String)globalMap.get("UploadFileName"))+""
HTTP Method: POST
HTTP Headers :
name: "Authorization" context.connection_ServiceNow_Basic_Authorization
"Accept" "application/json"
"Content-type" "application/"+((String)globalMap.get("FILE_TYPE"))
HTTP Body : (byte[])globalMap.get("BINARY_FILE_CONTENT")
But few documents giving below error.
Error Code :400
Error Message : {"error":{"message":"Invalid file type: application/doc","detail":null},"status":"failure"}
Please help in resolving this issue.
Thanks,
Rita
Hi,
Extension MIME Type
.doc application/msword
.docx application/vnd.openxmlformats-officedocument.wordprocessingml.document
https://developer.mozilla.org/fr/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types
Send me love and kudos