Official Ruby on Rails plugin for Filestack File Picker that makes it easy to add powerful file uploading and transformation capabilities to any web or mobile application.
The current filestack_js_init_tag helper can initialize a filestack client but the cname is not properly passed because the current code generates this:
var #{client_name} = filestack.init('#{apikey}', #{signature_and_policy}, '#{cname}');
The cname is passed as a third argument instead of being part of object passed as second argument. This used to work (at least with filestack-js v1) but in v3, it does not.
This patch uses the right init arguments when it runs with filestack-js v3.
filestack-js
v3'sinit
function expects two arguments: the api key and an object representing the eventual options (cname, ...). For instance:The current
filestack_js_init_tag
helper can initialize a filestack client but the cname is not properly passed because the current code generates this:The cname is passed as a third argument instead of being part of object passed as second argument. This used to work (at least with filestack-js v1) but in v3, it does not.
This patch uses the right init arguments when it runs with filestack-js v3.