Media type jpeg

master
Bob Mottram 2019-08-30 19:24:58 +01:00
parent e41dec3db6
commit 1758ca5799
1 changed files with 2 additions and 1 deletions

View File

@ -83,12 +83,13 @@ def attachImage(baseDir: str,httpPrefix: str,domain: str,port: int, \
acceptedTypes=['png','jpg','gif','mp4','webm','ogv','mp3','ogg']
for mType in acceptedTypes:
if imageFilename.endswith('.'+mType):
fileExtension=mType
if mType=='jpg':
mType='jpeg'
fileExtension=mType
if not fileExtension:
return postJson
mediaType=mediaType+'/'+fileExtension
print('Attached media type: '+mediaType)
if fileExtension=='jpeg':
fileExtension='jpg'