# File lib/fog/storage/atmos/models/file.rb, line 57
        def public_url(expires = (Time.now + 5 * 365 * 24 * 60 * 60))
          file = directory.files.head(key)
          self.objectid = if file && file.to_s.strip != "" then file.attributes['x-emc-meta'].scan(/objectid=(\w+),/).flatten[0] else nil end
          if self.objectid && self.objectid.to_s.strip != ""
            klass = service.ssl? ? URI::HTTPS : URI::HTTP
            uri = klass.build(:host => service.host, :port => service.port.to_i, :path => "/rest/objects/#{self.objectid}" )

            sb = "GET\n"
            sb += uri.path.downcase + "\n"
            sb += service.uid + "\n"
            sb += String(expires.to_i())

            signature = service.sign( sb )
            uri.query = "uid=#{CGI::escape(service.uid)}&expires=#{expires.to_i()}&signature=#{CGI::escape(signature)}"
            uri.to_s
          else
            nil
          end
        end