diff options
-rw-r--r-- | slixmpp/plugins/xep_0363/http_upload.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/slixmpp/plugins/xep_0363/http_upload.py b/slixmpp/plugins/xep_0363/http_upload.py index 0fc91f4e..0cca2d08 100644 --- a/slixmpp/plugins/xep_0363/http_upload.py +++ b/slixmpp/plugins/xep_0363/http_upload.py @@ -8,6 +8,7 @@ import asyncio import logging +import os.path from aiohttp import ClientSession from mimetypes import guess_type @@ -128,7 +129,8 @@ class XEP_0363(BasePlugin): if content_type is None: content_type = self.default_content_type - slot_iq = await self.request_slot(self.upload_service, filename, size, + basename = os.path.basename(filename) + slot_iq = await self.request_slot(self.upload_service, basename, size, content_type, ifrom, timeout) slot = slot_iq['http_upload_slot'] |