mirror of https://gitlab.com/bashrc2/epicyon
Check start of media type
parent
54eb574a7d
commit
33962fc0bf
|
@ -313,8 +313,6 @@ if args.tests:
|
||||||
runAllTests()
|
runAllTests()
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
args.blurhash=True
|
|
||||||
|
|
||||||
if args.testsnetwork:
|
if args.testsnetwork:
|
||||||
print('Network Tests')
|
print('Network Tests')
|
||||||
testPostMessageBetweenServers()
|
testPostMessageBetweenServers()
|
||||||
|
|
2
media.py
2
media.py
|
@ -118,7 +118,7 @@ def attachMedia(baseDir: str,httpPrefix: str,domain: str,port: int, \
|
||||||
'type': 'Document',
|
'type': 'Document',
|
||||||
'url': httpPrefix+'://'+domain+'/'+mediaPath
|
'url': httpPrefix+'://'+domain+'/'+mediaPath
|
||||||
}
|
}
|
||||||
if useBlurhash and mediaType=='image':
|
if useBlurhash and mediaType.startswith('image/'):
|
||||||
attachmentJson['blurhash']=getImageHash(imageFilename)
|
attachmentJson['blurhash']=getImageHash(imageFilename)
|
||||||
postJson['attachment']=[attachmentJson]
|
postJson['attachment']=[attachmentJson]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue