mirror of https://gitlab.com/bashrc2/epicyon
Extract image from post
parent
dcc3683133
commit
dd5fdfa192
|
@ -2686,7 +2686,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
postValue+='\n'
|
||||
postValue+=postLines[line]
|
||||
fields[postKey]=postValue
|
||||
else:
|
||||
if imageLocation>-1:
|
||||
# directly search the binary array for the beginning
|
||||
# of an image
|
||||
extensionList=['png','jpeg','gif','mp4','webm','ogv','mp3','ogg']
|
||||
|
@ -2709,9 +2709,10 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.baseDir+'/accounts/'+ \
|
||||
nickname+'@'+self.server.domain+'/upload'
|
||||
if imageLocation>-1:
|
||||
imageFound=True
|
||||
if extension=='jpeg':
|
||||
extension='jpg'
|
||||
if extension=='mpeg':
|
||||
elif extension=='mpeg':
|
||||
extension='mp3'
|
||||
filename=filenameBase+'.'+extension
|
||||
attachmentMediaType= \
|
||||
|
|
Loading…
Reference in New Issue