nylas / nylas-ruby

Ruby bindings for the Nylas Platform APIs
https://nylas.com/docs
MIT License
101 stars 130 forks source link

Fetching contact's picture raises `Encoding::UndefinedConversionError` #422

Closed mc-bro closed 11 months ago

mc-bro commented 1 year ago

Describe the bug Fetching contact's picture raises Encoding::UndefinedConversionError ("\xFF" from ASCII-8BIT to UTF-8)

Similar issue was fixed some time ago here: https://github.com/nylas/nylas-ruby/pull/193

The solution is to pass encoding argument when creating a Tempfile:

Tempfile.new(encoding: 'ascii-8bit')
mrashed-dev commented 1 year ago

Thanks for opening the issue @mc-bro, we will fix this and include it in a future release!