def fill_out(session)
      session['scope'] = "attachments"
      if @digest
        session['resource'] = @digest
      else
        session['resource'] = to_hash
        session['url'] = @url
        session['etag'] = @etag
      end
      @token = session.to_s
    end
def fill_out(session)
      session['scope'] = "attachments"
      if @digest
        session['resource'] = @digest
      else
        session['resource'] = to_hash
        session['url'] = @url
        session['etag'] = @etag
      end
      @token = session.to_s
    end
Fill out the session cookie appropriately for this attachment.