Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug with file sending #98

Open
maxd opened this issue Apr 26, 2016 · 0 comments
Open

Bug with file sending #98

maxd opened this issue Apr 26, 2016 · 0 comments

Comments

@maxd
Copy link

maxd commented Apr 26, 2016

Right now airbone has a bug which block file sending. Look at this line. As you can see this line always convert body Hash to string. In my case it is cause error:

Encoding::UndefinedConversionError:
  "\xFF" from ASCII-8BIT to UTF-8

because my image file contains data incompatible with UTF-8 encoding.

I found the following workaround:

response = RestClient.post(get_url('/test'), {
    description: 'Bla-bla-bla',
    image: File.new(Rails.root.join('spec', 'fixtures', 'files', 'photo.jpg'), 'rb')
  })
self.instance_variable_set(:@response, response)

As you can see I just send request directly through RestClient (don't use airbone wrappers).

@sethpollack Could you please fix this problem with sending files over airbone?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant