mirror of https://gitlab.com/bashrc2/epicyon
Special handling of logo changes
parent
e4c75578c5
commit
672a36d038
|
@ -3242,7 +3242,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
nickname+'@'+self.server.domain+'/'+mType+'.temp'
|
nickname+'@'+self.server.domain+'/'+mType+'.temp'
|
||||||
else:
|
else:
|
||||||
filenameBase= \
|
filenameBase= \
|
||||||
self.server.baseDir+'/accounts/logo.temp.png'
|
self.server.baseDir+'/accounts/logo.temp'
|
||||||
|
|
||||||
filename,attachmentMediaType= \
|
filename,attachmentMediaType= \
|
||||||
saveMediaInFormPOST(mediaBytes,self.server.debug,filenameBase)
|
saveMediaInFormPOST(mediaBytes,self.server.debug,filenameBase)
|
||||||
|
@ -3257,6 +3257,9 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
if self.server.debug:
|
if self.server.debug:
|
||||||
print('DEBUG: POST '+mType+' media removing metadata')
|
print('DEBUG: POST '+mType+' media removing metadata')
|
||||||
postImageFilename=filename.replace('.temp','')
|
postImageFilename=filename.replace('.temp','')
|
||||||
|
if mType=='instanceLogo':
|
||||||
|
filename=self.server.baseDir+'/accounts/logo.temp.png'
|
||||||
|
postImageFilename=self.server.baseDir+'/accounts/logo.png'
|
||||||
removeMetaData(filename,postImageFilename)
|
removeMetaData(filename,postImageFilename)
|
||||||
if os.path.isfile(postImageFilename):
|
if os.path.isfile(postImageFilename):
|
||||||
print('profile update POST '+mType+' image saved to '+postImageFilename)
|
print('profile update POST '+mType+' image saved to '+postImageFilename)
|
||||||
|
|
Loading…
Reference in New Issue