Fix for images with special chars

closes #780
- added replacing of special chars with '_'
This commit is contained in:
Sebastian Gierlinger 2013-09-17 22:11:22 +02:00
parent 56620635db
commit 60d93bd3f3

View File

@ -78,7 +78,7 @@ adminControllers = {
tmp_path = req.files.uploadimage.path,
dir = path.join('content/images', year, month),
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) {
// adds directories recursively