# File lib/aws/s3/data_options.rb, line 90
      def try_to_determine_content_length options
        unless options[:content_length]

          data = options[:data]

          length = case
            when data.respond_to?(:bytesize) then data.bytesize
            when data.respond_to?(:size)     then data.size
            when data.respond_to?(:length)   then data.length
            when data.respond_to?(:path)     then File.size(data.path)
            else nil
          end

          options[:content_length] = length if length

        end
      end