def upload(options)
      payload = options
      channels = @api.channels # list of channel objects
      payload[:channels] ||= (options.fetch(:channel, @options['channel'])).split(/[\s,]+/).map do |name|
        channels.find { |c| name.match(/^#?#{c['name']}$/) }.fetch('id') # convert channel id to name
      end.join(',')
      @api.upload(payload)
      return nil # be quiet in webhook reply
    end
def upload(options)
      payload = options
      channels = @api.channels # list of channel objects
      payload[:channels] ||= (options.fetch(:channel, @options['channel'])).split(/[\s,]+/).map do |name|
        channels.find { |c| name.match(/^#?#{c['name']}$/) }.fetch('id') # convert channel id to name
      end.join(',')
      @api.upload(payload)
      return nil # be quiet in webhook reply
    end
simple wrapper on api.upload (which calls files.upload)
 pass 'channel' as a csv list of channel names, otherwise same args as files.upload