def __upload(self, resource, bytes):
        """Performs a single chunk upload."""

        # note: string conversion required here due to open encoding bug in requests-oauthlib.
        headers = {
            'x-ton-expires': http_time(self.options.get('x-ton-expires', self._DEFAULT_EXPIRE)),
            'content-length': str(self._file_size),
            'content-type': self.content_type
        }

        return Request(self._client, 'post', resource,
                       domain=self._DEFAULT_DOMAIN, headers=headers, body=bytes).perform()
def __upload ( self , resource , bytes ) : headers = { 'x-ton-expires' : http_time ( self . options . get ( 'x-ton-expires' , self . _DEFAULT_EXPIRE ) ) , 'content-length' : str ( self . _file_size ) , 'content-type' : self . content_type } return Request ( self . _client , 'post' , resource , domain = self . _DEFAULT_DOMAIN , headers = headers , body = bytes ) . perform ( )
Performs a single chunk upload.