Mercurial > libervia-backend
comparison frontends/src/jp/cmd_file.py @ 1824:a19161bb3ff7
plugin upload, XEP-0363: splitted fileUpload in fileUpload + upload:
fileUpload is used by external frontends, while upload can be used by frontends. upload return in addition to the progress_id a download_d Deferred which fire with URI when file is uploaded.
changed option ignore-tls-errors to ignore_tls_errors.
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 22 Jan 2016 20:24:17 +0100 |
parents | d17772b0fe22 |
children | 96ba685162f6 |
comparison
equal
deleted
inserted
replaced
1823:1424cc6f8e98 | 1824:a19161bb3ff7 |
---|---|
274 self.host.quit(1) | 274 self.host.quit(1) |
275 | 275 |
276 self.full_dest_jid = self.host.get_full_jid(self.args.jid) if self.args.jid is not None else '' | 276 self.full_dest_jid = self.host.get_full_jid(self.args.jid) if self.args.jid is not None else '' |
277 options = {} | 277 options = {} |
278 if self.args.ignore_tls_errors: | 278 if self.args.ignore_tls_errors: |
279 options['ignore-tls-errors'] = C.BOOL_TRUE | 279 options['ignore_tls_errors'] = C.BOOL_TRUE |
280 | 280 |
281 path = os.path.abspath(file_) | 281 path = os.path.abspath(file_) |
282 self.host.bridge.fileUpload(path, '', self.full_dest_jid, options, self.profile, callback=lambda pid, file_=file_: self.gotId(pid, file_), errback=self.error) | 282 self.host.bridge.fileUpload(path, '', self.full_dest_jid, options, self.profile, callback=lambda pid, file_=file_: self.gotId(pid, file_), errback=self.error) |
283 | 283 |
284 | 284 |