Include username in path for full screen image

main2
Bob Mottram 2019-10-23 13:47:06 +01:00
parent a1bfc981dd
commit 626ee41f6b
2 changed files with 3 additions and 3 deletions

View File

@ -754,7 +754,7 @@ class PubServer(BaseHTTPRequestHandler):
'/emoji/' not in self.path and \
'/tags/' not in self.path and \
'/avatars/' not in self.path and \
not self.path.startswith('/fullscreen') and \
'/fullscreen?' not in self.path and \
'/icons/' not in self.path:
divertToLoginScreen=True
if self.path.startswith('/users/'):
@ -973,7 +973,7 @@ class PubServer(BaseHTTPRequestHandler):
return
# full screen images shown from the media timeline
if htmlGET and authorized and self.path.startswith('/fullscreen'):
if htmlGET and authorized and '/fullscreen?' in self.path:
imageFilename=self.path.split('?img=')[1]
if '?' in imageFilename:
imageFilename=imageFilename.split('?')[0]

View File

@ -1922,7 +1922,7 @@ def individualPostAsHtml(iconsDir: str,translate: {}, \
if boxName=='tlmedia':
galleryStr+= \
'<div class="gallery">\n' \
' <a href="/fullscreen?img='+attach['url']+'?desc='+imageDescription+'">\n' \
' <a href="/users/'+nickname+'/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+= \