parent
898ac96647
commit
711f3cbbb0
|
@ -19,7 +19,7 @@ import threading
|
||||||
import ssl
|
import ssl
|
||||||
import urllib
|
import urllib
|
||||||
from urllib.request import Request, urlopen
|
from urllib.request import Request, urlopen
|
||||||
from urllib.parse import urlparse
|
from urllib.parse import urlparse, quote
|
||||||
import io
|
import io
|
||||||
import mimetypes
|
import mimetypes
|
||||||
import logging
|
import logging
|
||||||
|
@ -187,7 +187,7 @@ class ConnectionHTTPUpload:
|
||||||
id_ = app.get_an_id()
|
id_ = app.get_an_id()
|
||||||
iq.setID(id_)
|
iq.setID(id_)
|
||||||
request = iq.setTag(name="request", namespace=NS_HTTPUPLOAD)
|
request = iq.setTag(name="request", namespace=NS_HTTPUPLOAD)
|
||||||
request.addChild('filename', payload=os.path.basename(file.path))
|
request.addChild('filename', payload=quote(os.path.basename(file.path)))
|
||||||
request.addChild('size', payload=file.size)
|
request.addChild('size', payload=file.size)
|
||||||
request.addChild('content-type', payload=file.mime)
|
request.addChild('content-type', payload=file.mime)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue