Image download fix for images without extension
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
a845f53f0a
commit
215e0c9fc4
|
@ -48,7 +48,11 @@ module.exports = Self => {
|
|||
|
||||
const srcFile = image.url.split('/').pop();
|
||||
const dotIndex = srcFile.lastIndexOf('.');
|
||||
const fileName = srcFile.substring(0, dotIndex);
|
||||
|
||||
let fileName = srcFile.substring(0, dotIndex);
|
||||
if (dotIndex == -1)
|
||||
fileName = srcFile;
|
||||
|
||||
const file = `${fileName}.png`;
|
||||
const filePath = path.join(tempPath, file);
|
||||
|
||||
|
|
Loading…
Reference in New Issue