mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
Fix for images with special chars
closes #780 - added replacing of special chars with '_'
This commit is contained in:
parent
56620635db
commit
60d93bd3f3
1 changed files with 1 additions and 1 deletions
|
@ -78,7 +78,7 @@ adminControllers = {
|
||||||
tmp_path = req.files.uploadimage.path,
|
tmp_path = req.files.uploadimage.path,
|
||||||
dir = path.join('content/images', year, month),
|
dir = path.join('content/images', year, month),
|
||||||
ext = path.extname(req.files.uploadimage.name).toLowerCase(),
|
ext = path.extname(req.files.uploadimage.name).toLowerCase(),
|
||||||
basename = path.basename(req.files.uploadimage.name, ext);
|
basename = path.basename(req.files.uploadimage.name, ext).replace(/[\W]/gi, '_');
|
||||||
|
|
||||||
function renameFile(target_path) {
|
function renameFile(target_path) {
|
||||||
// adds directories recursively
|
// adds directories recursively
|
||||||
|
|
Loading…
Add table
Reference in a new issue