FreshDesk / Service Create a ticket with attachments error

Hi All,

I’ve been trying to hit FreshService Create a Ticket API from my react native app.

However, i kept getting validation error for attachments, if i do not append any attachments, the requests are succesfful.

{
  "description": "Validation failed",
  "errors": [
    {
      "field": "attachments",
      "message": "It should contain elements of type valid file format only",
      "code": "datatype_mismatch"
    }
  ]
}

this is my request on my RN debugger:


am i using the wrong uri? or am i appending the object wrong? , it does not work if i just append the uri only also.
Please help! thanks

Hi,
have you tried another file other than the .png? Does the error not like your .png extension?

Hi thanks for the reply,

i’ve also tried PDF. still get the same error

Hi, bumping this.

Anyone used React Native to upload attachments before? Thanks a million!

bump please, still facing this issue

Hello @Wa_D ,

I was facing pretty much the same problem last year. This solution worked for me.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.