filestack / filestack-ruby

Official Ruby SDK for Filestack - API and content management system that makes it easy to add powerful file uploading and transformation capabilities to any web or mobile application.
https://www.filestack.com
Apache License 2.0
34 stars 27 forks source link

Typhoeus upgrade compatibility issues #28

Closed amckinnie closed 6 years ago

amckinnie commented 6 years ago

Upgrading to version 2.3, I've been running into a couple of compatability issues that are due to the upgrade:

  1. Calls to the typhoeus library appear to be using the wrong key to pass parameters via url, e.g. Typhoeus.public_send(action, url, body: parameters, headers: headers) in UploadUtils#make_call should be using the params parameter instead of body. An example of this showing up is FilestackFilelink#metadata no longer recognizing parameters passed to it.
  2. Typhoeus return values are now JSON strings instead of hashes. While this can be worked around in cases where the direct response is returned, it causes issues when further parsing happens after the response. For example, in Transform#store, the method attempts to pull the handle from the response string, with the result being a FilestackFilelink being declared with the handle 'url' instead of pulling the url out of the response.
gabifija commented 6 years ago

@amckinnie - Thank you for pointing out my mistake. Please take a look on current released version of Ruby SDK.