def _upload_chunk(self, chunk_offset, chunk_data):
     block_id = url_quote(_encode_base64('{0:032d}'.format(chunk_offset)))
     self.blob_service._put_block(
         self.container_name,
         self.blob_name,
         chunk_data,
         block_id,
         validate_content=self.validate_content,
         lease_id=self.lease_id,
         timeout=self.timeout,
     )
     return BlobBlock(block_id)
 def _upload_chunk(self, chunk_offset, chunk_data):
     block_id = url_quote(_encode_base64('{0:032d}'.format(chunk_offset)))
     self.blob_service._put_block(
         self.container_name,
         self.blob_name,
         chunk_data,
         block_id,
         validate_content=self.validate_content,
         lease_id=self.lease_id,
         timeout=self.timeout,
     )
     return BlobBlock(block_id)
Пример #3
0
 def get_token(self):
     # a conscious decision was made to exclude the timestamp in the generated token
     # this is to avoid having two snapshot ids in the query parameters when the user appends the snapshot timestamp
     exclude = [_BlobQueryStringConstants.SIGNED_TIMESTAMP]
     return '&'.join(['{0}={1}'.format(n, url_quote(v))
                      for n, v in self.query_dict.items() if v is not None and n not in exclude])