def url_path
      # Get the path component of the URL as a relative path
      filename = URI.parse(url).path
      filename.slice!(0) # Remove the leading /
      # Return the path with '.json' extension if not already present
      filename.end_with?('.json') ? filename : "#{filename}.json"
    rescue URI::InvalidComponentError, URI::InvalidURIError
      # Return nil if the URL is invalid
      nil
    end
def url_path
      # Get the path component of the URL as a relative path
      filename = URI.parse(url).path
      filename.slice!(0) # Remove the leading /
      # Return the path with '.json' extension if not already present
      filename.end_with?('.json') ? filename : "#{filename}.json"
    rescue URI::InvalidComponentError, URI::InvalidURIError
      # Return nil if the URL is invalid
      nil
    end
Returns the path from the URL as a relative filename