zendesk / zendesk_api_client_rb

Official Ruby Zendesk API Client
http://developer.zendesk.com/
Apache License 2.0
387 stars 183 forks source link

Comment uploads will lose the content type #338

Open awakenrz opened 7 years ago

awakenrz commented 7 years ago

I use the API to upload attachments to a comment:

ticket.comment.uploads << file
ticket.save!

However, all the uploads lost their content_type.

I've tried the following too:

ticket.comment.uploads << {
  :filename => file.original_filename,
  :file => file.path,
  :content_type => file.content_type
}

But the content type is still missing when I later fetch the attachment for the comment.