Only send the filename
This commit is contained in:
parent
8500b77024
commit
3fe444e5aa
|
@ -19,4 +19,4 @@ data = open(filename, "rb").read()
|
||||||
def strtr(x, c="B"):
|
def strtr(x, c="B"):
|
||||||
return struct.pack(c, len(x)) + x
|
return struct.pack(c, len(x)) + x
|
||||||
|
|
||||||
s.sendall(strtr(filename.encode('utf-8')) + strtr(mime.encode('utf-8')) + strtr(data, "!I"))
|
s.sendall(strtr(filename.split(os.pathsep)[-1].encode('utf-8')) + strtr(mime.encode('utf-8')) + strtr(data, "!I"))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user