Done. Changing to:

    resource = '/{self.bucket.name}/{self.name}'.format(self=self)