d.addCallback(lambda res: n)
return d
- def upload(self, uploadable):
+ def upload(self, uploadable, options={}):
uploader = self.getServiceNamed("uploader")
- return uploader.upload(uploadable)
+ return uploader.upload(uploadable, options)
IEncryptedUploadable."""
implements(IEncryptedUploadable)
- def __init__(self, original):
+ def __init__(self, original, options={}):
self.original = original
+ self._options = options
self._encryptor = None
self._plaintext_hasher = plaintext_hasher()
self._plaintext_segment_hasher = None
def start(self, uploadable):
u = IUploadable(uploadable)
- eu = IEncryptedUploadable(EncryptAnUploadable(u))
+ eu = IEncryptedUploadable(EncryptAnUploadable(u, self._options))
self._encuploadable = eu
d = eu.get_size()
d.addCallback(self._got_size)