Merge branch 'test' of https://gitea.verdnatura.es/verdnatura/salix into dev
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Joan Sanchez 2021-04-02 17:04:37 +02:00
commit a2144405ab
1 changed files with 2 additions and 1 deletions

View File

@ -50,8 +50,9 @@ module.exports = Self => {
const fileName = srcFile.replace(/\.|\/|:|\?|\\|=|%/g, ''); const fileName = srcFile.replace(/\.|\/|:|\?|\\|=|%/g, '');
const file = `${fileName}.png`; const file = `${fileName}.png`;
const filePath = path.join(tempPath, file); const filePath = path.join(tempPath, file);
const imageUrl = image.url.replace('http://', 'https://');
https.get(image.url, async response => { https.get(imageUrl, async response => {
if (response.statusCode != 200) { if (response.statusCode != 200) {
const error = new Error(`Could not download the image. Status code ${response.statusCode}`); const error = new Error(`Could not download the image. Status code ${response.statusCode}`);