mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
Remove encodeURI
This commit is contained in:
@@ -193,7 +193,7 @@ export default class CodeEditor extends React.Component {
|
|||||||
const filename = path.basename(imagePath)
|
const filename = path.basename(imagePath)
|
||||||
|
|
||||||
copyImage(imagePath, this.props.storageKey).then((imagePathInTheStorage) => {
|
copyImage(imagePath, this.props.storageKey).then((imagePathInTheStorage) => {
|
||||||
const imageMd = ``
|
const imageMd = ``
|
||||||
this.insertImageMd(imageMd)
|
this.insertImageMd(imageMd)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ function copyImage (filePath, storageKey) {
|
|||||||
const basename = `${imageName}${imageExt}`
|
const basename = `${imageName}${imageExt}`
|
||||||
const outputImage = fs.createWriteStream(path.join(targetStorage.path, 'images', basename))
|
const outputImage = fs.createWriteStream(path.join(targetStorage.path, 'images', basename))
|
||||||
inputImage.pipe(outputImage)
|
inputImage.pipe(outputImage)
|
||||||
resolve(`${encodeURI(targetStorage.path)}/images/${encodeURI(basename)}`)
|
resolve(`${targetStorage.path}/images/${basename}`)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return reject(e)
|
return reject(e)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user