mirror of
https://gitlab.com/bashrc2/epicyon
synced 2026-11-05 04:02:21 +00:00
Edit blog image attachments
This commit is contained in:
1 parent
65ad349f44
commit
faadec7720
1 file changed
+17
@@ -3962,6 +3962,23 @@ class PubServer(BaseHTTPRequestHandler):
|
||||
replaceEmojiFromTags(fields['message'],tags,'content')
|
||||
|
||||
postJsonObject['object']['content']=fields['message']
|
||||
|
||||
imgDescription=''
|
||||
if fields.get('imageDescription'):
|
||||
imgDescription=fields['imageDescription']
|
||||
|
||||
if filename:
|
||||
postJsonObject['object']= \
|
||||
attachMedia(self.server.baseDir, \
|
||||
self.server.httpPrefix, \
|
||||
self.server.domain, \
|
||||
self.server.port, \
|
||||
postJsonObject['object'], \
|
||||
filename, \
|
||||
attachmentMediaType, \
|
||||
imgDescription, \
|
||||
self.server.useBlurhash)
|
||||
|
||||
saveJson(postJsonObject,postFilename)
|
||||
print('Edited blog post, resaved '+postFilename)
|
||||
return 1
|
||||
|
||||
Reference in new issue
Block a user