def upload_to_s3(json)
      if defined?(AWS::S3::MultipartUpload) and @filesize > 100.megabytes
        # aws-sdk gem installed
        upload_by_aws_sdk(json)
      else
        # fallback to multipart-post
        upload_by_multipart_post(json)
      end
    rescue
      abort_with("upload error: #{$!} - please contact our support.", :upload_error)
    end
def upload_to_s3(json)
      if defined?(AWS::S3::MultipartUpload) and @filesize > 100.megabytes
        # aws-sdk gem installed
        upload_by_aws_sdk(json)
      else
        # fallback to multipart-post
        upload_by_multipart_post(json)
      end
    rescue
      abort_with("upload error: #{$!} - please contact our support.", :upload_error)
    end
Upload