def filename
      # Based on the path of the file
      path = resource.url.uri.path
      # It's either an index.html file
      # if the path ends with a slash
      if path.end_with?('/')
        return path + 'index.html'
      # Or it's also an index.html if it ends
      # without a slah yet is not a file with an
      # extension
      elsif !path.split('/').last.include?(".")
        return path + '/index.html'
      end
      # Alternative, the filename is the path as described
      path
    end
def filename
      # Based on the path of the file
      path = resource.url.uri.path
      # It's either an index.html file
      # if the path ends with a slash
      if path.end_with?('/')
        return path + 'index.html'
      # Or it's also an index.html if it ends
      # without a slah yet is not a file with an
      # extension
      elsif !path.split('/').last.include?(".")
        return path + '/index.html'
      end
      # Alternative, the filename is the path as described
      path
    end
The actual name of the file