def upload(options = {})
      payload = {}
      payload[:captchafile] = "base64:#{options[:raw64]}"
      payload[:type] = options[:type] if options[:type].to_i > 0

      if options[:type].to_i == 3
        banner64 = load_captcha(options[:banner])
        raise DeathByCaptcha::InvalidCaptcha if banner64.to_s.empty?

        payload[:banner] = "base64:#{banner64}"
        payload[:banner_text] = options[:banner_text].to_s

      elsif options[:type].to_i == 4
        payload = {
          type: 4,
          token_params: options[:token_params].to_json,
        }
      end

      response = perform('captcha', :post_multipart, payload)
      DeathByCaptcha::Captcha.new(response)
    end
def upload(options = {})
      payload = {}
      payload[:captchafile] = "base64:#{options[:raw64]}"
      payload[:type] = options[:type] if options[:type].to_i > 0

      if options[:type].to_i == 3
        banner64 = load_captcha(options[:banner])
        raise DeathByCaptcha::InvalidCaptcha if banner64.to_s.empty?

        payload[:banner] = "base64:#{banner64}"
        payload[:banner_text] = options[:banner_text].to_s

      elsif options[:type].to_i == 4
        payload = {
          type: 4,
          token_params: options[:token_params].to_json,
        }
      end

      response = perform('captcha', :post_multipart, payload)
      DeathByCaptcha::Captcha.new(response)
    end
Upload a captcha to DeathByCaptcha.

 This method will not return the solution. It's only useful if you want to
 implement your own "decode" function.

 @return [DeathByCaptcha::Captcha] The captcha object (not solved yet).