From 888f2adf4782cdae27c6265697d3d03211770b12 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 2 Aug 2019 11:10:41 +0100 Subject: [PATCH] Correct image ordering when selecting profile pictures --- daemon.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/daemon.py b/daemon.py index 17fd85a1..20b1e4d3 100644 --- a/daemon.py +++ b/daemon.py @@ -1651,6 +1651,14 @@ class PubServer(BaseHTTPRequestHandler): postValue+=postLines[line] fields[postKey]=postValue else: + if 'filename="' not in postStr: + continue + filenameStr=postStr.split('filename="')[1] + if '"' not in filenameStr: + continue + postImageFilename=filenameStr.split('"')[0] + if '.' not in postImageFilename: + continue # directly search the binary array for the beginning # of an image searchStr=b'Content-Type: image/png' @@ -1694,6 +1702,8 @@ class PubServer(BaseHTTPRequestHandler): removeMetaData(filename,filename.replace('.temp','')) os.remove(filename) lastImageLocation=imageLocation+1 + print('**********************************************************') + pprint(fields) actorFilename=self.server.baseDir+'/accounts/'+nickname+'@'+self.server.domain+'.json' if os.path.isfile(actorFilename):