url format

main2
Bob Mottram 2019-10-23 13:17:40 +01:00
parent e31b227066
commit 9027d68ab7
2 changed files with 8 additions and 4 deletions

View File

@ -974,11 +974,15 @@ class PubServer(BaseHTTPRequestHandler):
# full screen images shown from the media timeline
if self.path.startswith('/fullscreen?'):
fullscreenImageStr=self.path.split('?')
fullscreenImageStr=self.path.split('?img=')
imageFilename=fullscreenImageStr[1]
if '?' in imageFilename:
imageFilename=imageFilename.split('?')[0]
imageDescription=None
if len(fullscreenImageStr)>2:
imageDescription=fullscreenImageStr[2]
if '?desc=' in self.path:
imageDescription=self.path.split('?desc=')
if '?' in imageDescription:
imageDescription=imageDescription.split('?')[0]
msg=htmlFullScreenImage(imageFilename,imageDescription)
self._login_headers('text/html',len(msg))
self._write(msg)

View File

@ -1922,7 +1922,7 @@ def individualPostAsHtml(iconsDir: str,translate: {}, \
if boxName=='tlmedia':
galleryStr+= \
'<div class="gallery">\n' \
' <a href="/fullscreen?'+attach['url']+'?'+imageDescription+'">\n' \
' <a href="/fullscreen?img='+attach['url']+'?desc='+imageDescription+'">\n' \
' <img loading="lazy" src="'+attach['url']+'" alt="'+imageDescription+'" title="'+imageDescription+'" width="600" height="400">\n' \
' </a>\n</div>\n'
attachmentStr+= \