# File lib/aws/s3/data_options.rb, line 91 def try_to_determine_content_length options unless options[:content_length] data = options[:data] length = case when data.respond_to?(:path) && data.path then File.size(data.path) when data.respond_to?(:bytesize) then data.bytesize when data.respond_to?(:size) then data.size when data.respond_to?(:length) then data.length else nil end options[:content_length] = length if length end end