mirror of https://gitlab.com/bashrc2/epicyon
More debug
parent
a01bc05634
commit
89e7995a33
18
daemon.py
18
daemon.py
|
@ -5420,18 +5420,18 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
for mType in profileMediaTypes:
|
for mType in profileMediaTypes:
|
||||||
if self.server.debug:
|
if self.server.debug:
|
||||||
print('DEBUG: profile update extracting ' + mType +
|
print('DEBUG: profile update extracting ' + mType +
|
||||||
' image from POST')
|
' image or font from POST')
|
||||||
mediaBytes, postBytes = \
|
mediaBytes, postBytes = \
|
||||||
extractMediaInFormPOST(postBytes, boundary, mType)
|
extractMediaInFormPOST(postBytes, boundary, mType)
|
||||||
if mediaBytes:
|
if mediaBytes:
|
||||||
if self.server.debug:
|
if self.server.debug:
|
||||||
print('DEBUG: profile update ' + mType +
|
print('DEBUG: profile update ' + mType +
|
||||||
' image was found. ' +
|
' image or font was found. ' +
|
||||||
str(len(mediaBytes)) + ' bytes')
|
str(len(mediaBytes)) + ' bytes')
|
||||||
else:
|
else:
|
||||||
if self.server.debug:
|
if self.server.debug:
|
||||||
print('DEBUG: profile update, no ' + mType +
|
print('DEBUG: profile update, no ' + mType +
|
||||||
' image was found in POST')
|
' image or font was found in POST')
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Note: a .temp extension is used here so that at no
|
# Note: a .temp extension is used here so that at no
|
||||||
|
@ -5455,19 +5455,21 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
filenameBase)
|
filenameBase)
|
||||||
if filename:
|
if filename:
|
||||||
print('Profile update POST ' + mType +
|
print('Profile update POST ' + mType +
|
||||||
' media filename is ' + filename)
|
' media or font filename is ' + filename)
|
||||||
else:
|
else:
|
||||||
print('Profile update, no ' + mType +
|
print('Profile update, no ' + mType +
|
||||||
' media filename in POST')
|
' media or font filename in POST')
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if self.server.debug:
|
|
||||||
print('DEBUG: POST ' + mType +
|
|
||||||
' media removing metadata')
|
|
||||||
postImageFilename = filename.replace('.temp', '')
|
postImageFilename = filename.replace('.temp', '')
|
||||||
if mType == 'customFont':
|
if mType == 'customFont':
|
||||||
copyfile(filename, postImageFilename)
|
copyfile(filename, postImageFilename)
|
||||||
|
print('profile POST ' + mType +
|
||||||
|
' image or font filename ' + postImageFilename)
|
||||||
else:
|
else:
|
||||||
|
if self.server.debug:
|
||||||
|
print('DEBUG: POST ' + mType +
|
||||||
|
' media removing metadata')
|
||||||
removeMetaData(filename, postImageFilename)
|
removeMetaData(filename, postImageFilename)
|
||||||
if os.path.isfile(postImageFilename):
|
if os.path.isfile(postImageFilename):
|
||||||
print('profile update POST ' + mType +
|
print('profile update POST ' + mType +
|
||||||
|
|
Loading…
Reference in New Issue