mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 20:03:12 +03:00
Fix for image uploads
- express 3.4.0 uses connect 2.9.0 which had a sizable change to how multipart woks - this change resulting in req.files.uploadimage.type going away
This commit is contained in:
parent
c732cd2ccb
commit
b4e04b3650
@ -79,7 +79,7 @@ adminControllers = {
|
||||
imagespath = path.join(ghost.paths().appRoot, 'content/images'),
|
||||
dir = path.join(imagespath, year, month),
|
||||
ext = path.extname(req.files.uploadimage.name).toLowerCase(),
|
||||
type = req.files.uploadimage.type,
|
||||
type = req.files.uploadimage.type || req.files.uploadimage.headers['content-type'],
|
||||
basename = path.basename(req.files.uploadimage.name, ext).replace(/[\W]/gi, '_');
|
||||
|
||||
function renameFile(target_path) {
|
||||
|
Loading…
Reference in New Issue
Block a user