This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def decode_transloadit_json | |
return unless params[:transloadit].present? | |
# wrap transloadit params in a HashWithIndifferentAccess | |
params[:transloadit] = ActiveSupport::HashWithIndifferentAccess.new( | |
ActiveSupport::JSON.decode params[:transloadit] | |
) | |
# decode parameters from transloadit | |
params[:transloadit][:uploads].first.tap do |history| |