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