Encode string as bytes

master
Bob Mottram 2019-08-30 17:35:32 +01:00
parent 3ae7928dec
commit 832937de97
1 changed files with 2 additions and 2 deletions

View File

@ -1831,8 +1831,8 @@ class PubServer(BaseHTTPRequestHandler):
}
for mType,extensionList in mediaTypes.items():
for extension in extensionList:
searchStr=b'Content-Type: '+mType+'/'+extension
imageLocation=postBytes.find(searchStr)
searchStr='Content-Type: '+mType+'/'+extension
imageLocation=postBytes.find(searchStr.encode('utf-8'))
filenameBase=self.server.baseDir+'/accounts/'+nickname+'@'+self.server.domain+'/upload'
if imageLocation>-1:
if extension=='jpeg':