Commit cda3edbd authored by Damien DESPRES's avatar Damien DESPRES
Browse files

Merge branch 'image-servie-par-minio' into 'development'

verification que le contenu n'est pas vide

See merge request !7
parents 3d59ec28 76f15eec
Pipeline #14441 passed with stages
in 1 minute and 16 seconds
......@@ -160,13 +160,14 @@ def replaceGhostUrlByMinioUrl(cfg,client,doc):
new_url=minio_read_url+'/'+bucket_name+'/'+file_path
logger.debug('New URL:'+new_url)
doc['content-fr']['feature_image']=new_url
urls = re.findall('src="(https:\/\/ghost[^"]*)', fr_content)
for url in urls:
logger.debug('URL '+url)
pushToMinio(client,bucket_name,url)
newcontent=re.sub('(https:\/\/ghost[^"]*\/images)', minio_read_url+'/'+bucket_name, fr_content)
logger.debug(newcontent)
doc['content-fr']['html']=newcontent
if fr_content is not None:
urls = re.findall('src="(https:\/\/ghost[^"]*)', fr_content)
for url in urls:
logger.debug('URL '+url)
pushToMinio(client,bucket_name,url)
newcontent=re.sub('(https:\/\/ghost[^"]*\/images)', minio_read_url+'/'+bucket_name, fr_content)
logger.debug(newcontent)
doc['content-fr']['html']=newcontent
return doc
def pushToMinio( client,bucket_name,image ):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment