Can I remove added attachment in textbox programmatically? | Community
Skip to main content

Can I remove added attachment in textbox programmatically?

  • June 21, 2023
  • 3 replies
  • 0 views

I need to set or reset attachment value programmatically?

For comment text we can do using this function and it's working

client.set('comment.text', value)

But for the attahcment does not work

client.set('comment.attachments', value)

Can anyone help for achieve this problem, It's very important for me

3 replies

  • July 2, 2023
Hi Jigar!
 
Unfortunately, attachments are unable to be set with the Client API directly. You would need to use the Ticket Attachments workflow which utilizes the Upload & Tickets API's Once you have the token from the Upload API, you can then use the request method from ZAFClient to make the call to the Tickets API and add the attachment. 

  • Author
  • July 6, 2023

Thanks for the replay @erica26

But what I want I have to remove selected attahcment when user click my app logo for sending message text is clear using 

client.set('comment.text', '')
This function but attachment doesn't remove

Can we remove attachment progametaclly from the text editor? using client sdk  

 

Please let me know if any other solution you have


  • August 30, 2023

Hello!

Did you by any chance find a way to do this @jigar11? I also need it :D