mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-17 10:20:13 +00:00
upload: change _compute_uri a bit, get infile in a different way
This commit is contained in:
parent
9a2e0cf28e
commit
f5a49aa7ee
@ -82,7 +82,7 @@ class FileUploader:
|
|||||||
|
|
||||||
# create the encoder, so we can know how large the shares will be
|
# create the encoder, so we can know how large the shares will be
|
||||||
self._encoder = encode_new.Encoder()
|
self._encoder = encode_new.Encoder()
|
||||||
self._encoder.setup(infile)
|
self._encoder.setup(self._filehandle)
|
||||||
share_size = self._encoder.get_share_size()
|
share_size = self._encoder.get_share_size()
|
||||||
block_size = self._encoder.get_block_size()
|
block_size = self._encoder.get_block_size()
|
||||||
|
|
||||||
@ -189,8 +189,9 @@ class FileUploader:
|
|||||||
return self._encoder.start()
|
return self._encoder.start()
|
||||||
|
|
||||||
def _compute_uri(self, roothash):
|
def _compute_uri(self, roothash):
|
||||||
params = self._encoder.get_serialized_params()
|
codec_type = self._encoder._codec.get_encoder_type()
|
||||||
return pack_uri(self._encoder.get_encoder_type(), params, self._verifierid, roothash, self.needed_shares, self.total_shares, self._size, self._encoder.segment_size)
|
codec_params = self._encoder._codec.get_serialized_params()
|
||||||
|
return pack_uri(codec_type, codec_params, self._verifierid, roothash, self.needed_shares, self.total_shares, self._size, self._encoder.segment_size)
|
||||||
|
|
||||||
|
|
||||||
def netstring(s):
|
def netstring(s):
|
||||||
|
Loading…
Reference in New Issue
Block a user