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