comparison src/plugins/plugin_xep_0096.py @ 1640:d470affbe65c

plugin XEP-0363, upload: File upload (through HTTP upload only for now): - HTTP upload implementation - if the upload link is HTTPS, certificate is checked (can be disabled on demand) - file can be uploaded directly, or a put/get slot can be requested without actual upload. The later is mainly useful for distant frontends like Libervia - upload plugin manage different upload methods, in a similar way as file plugin - download url is sent in progressFinished metadata on successful upload
author Goffi <goffi@goffi.org>
date Sun, 22 Nov 2015 17:33:30 +0100
parents 846a39900fa6
children d17772b0fe22
comparison
equal deleted inserted replaced
1639:baac2e120600 1640:d470affbe65c
334 from_s = stanza_err.stanza['from'] 334 from_s = stanza_err.stanza['from']
335 log.info(u"File transfer refused by {}".format(from_s)) 335 log.info(u"File transfer refused by {}".format(from_s))
336 self.host.bridge.newAlert(_("The contact {} has refused your file").format(from_s), _("File refused"), "INFO", client.profile) 336 self.host.bridge.newAlert(_("The contact {} has refused your file").format(from_s), _("File refused"), "INFO", client.profile)
337 else: 337 else:
338 log.warning(_(u"Error during file transfer")) 338 log.warning(_(u"Error during file transfer"))
339 self.host.bridge.newAlert(_(u"Something went wrong during the file transfer session initialisation: {reason}").format(reason=unicode(stanza_err.value)), _("File transfer error"), "ERROR", client.profile) 339 self.host.bridge.newAlert(_(u"Something went wrong during the file transfer session initialisation: {reason}").format(reason=unicode(stanza_err)), _("File transfer error"), "ERROR", client.profile)
340 elif failure.check(exceptions.DataError): 340 elif failure.check(exceptions.DataError):
341 log.warning(u'Invalid stanza received') 341 log.warning(u'Invalid stanza received')
342 else: 342 else:
343 log.error(u'Error while proposing stream: {}'.format(failure)) 343 log.error(u'Error while proposing stream: {}'.format(failure))
344 344