# File lib/dragonfly/file_data_store.rb, line 138
    def url_for(relative_path, opts={})
      if server_root.nil?
        raise UnableToFormUrl, "you need to configure server_root for #{self.class.name} in order to form urls"
      else
        _, __, path = absolute(relative_path).partition(server_root)
        if path.empty?
          raise UnableToFormUrl, "couldn't form url for uid #{relative_path.inspect} with root_path #{root_path.inspect} and server_root #{server_root.inspect}"
        else
          path
        end
      end
    end