plugin file download: meta plugin to handle file download:

- first code in backend to use async/await Python syntax \o/
- plugin with file upload
- URL schemes can be registered
- `http` and `https` schemes are handled by default
This commit is contained in:
Goffi 2019-12-20 12:28:04 +01:00
commit dfed376f62

View file

@ -81,15 +81,8 @@ class FilePlugin(object):
type_=C.MENU_SINGLE,
)
def _fileSend(
self,
peer_jid_s,
filepath,
name="",
file_desc="",
extra=None,
profile=C.PROF_KEY_NONE,
):
def _fileSend(self, peer_jid_s, filepath, name="", file_desc="", extra=None,
profile=C.PROF_KEY_NONE):
client = self.host.getClient(profile)
return self.fileSend(
client, jid.JID(peer_jid_s), filepath, name or None, file_desc or None, extra