def handle_ok_callback(self, file_id): file_info = fs.get_file_by_id(file_id) hashcode = file_info.hashcode path = file_info.path size = file_info.size product_id = file_info.id remote_type = file_info.remote_type remote_uri = file_info.remote_uri name = file_info.name encrypted_key = RSACipher.encrypt(file_info.aes_key) encrypted_key = Encoder.bytes_to_base64_str(encrypted_key) d = wallet.market_client.upload_file_info(hashcode, path, size, product_id, remote_type, remote_uri, name, encrypted_key) def cb(status): self.okSignal.emit(status) d.addCallbacks(cb)