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.
This commit is contained in:
parent
333a43e824
commit
94ec775019
1 changed files with 58 additions and 25 deletions
|
|
@ -276,7 +276,7 @@ class Upload(base.CommandBase):
|
|||
self.full_dest_jid = self.host.get_full_jid(self.args.jid) if self.args.jid is not None else ''
|
||||
options = {}
|
||||
if self.args.ignore_tls_errors:
|
||||
options['ignore-tls-errors'] = C.BOOL_TRUE
|
||||
options['ignore_tls_errors'] = C.BOOL_TRUE
|
||||
|
||||
path = os.path.abspath(file_)
|
||||
self.host.bridge.fileUpload(path, '', self.full_dest_jid, options, self.profile, callback=lambda pid, file_=file_: self.gotId(pid, file_), errback=self.error)
|
||||
|
|
|
|||
Loading…
Reference in a new issue