mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
commit
9d55e68689
2 changed files with 3 additions and 3 deletions
|
@ -99,7 +99,7 @@
|
||||||
if (data.jqXHR.status === 413) {
|
if (data.jqXHR.status === 413) {
|
||||||
$dropzone.find('div.js-fail').text("The image you uploaded was too big.");
|
$dropzone.find('div.js-fail').text("The image you uploaded was too big.");
|
||||||
} else if (data.jqXHR.status === 415) {
|
} else if (data.jqXHR.status === 415) {
|
||||||
$dropzone.find('div.js-fail').text("The image type you uploaded is not supported. Please use .PNG, .JPG, .GIF.");
|
$dropzone.find('div.js-fail').text("The image type you uploaded is not supported. Please use .PNG, .JPG, .GIF, .SVG.");
|
||||||
} else {
|
} else {
|
||||||
$dropzone.find('div.js-fail').text("Something went wrong :(");
|
$dropzone.find('div.js-fail').text("Something went wrong :(");
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,8 +48,8 @@ adminControllers = {
|
||||||
ext = path.extname(req.files.uploadimage.name).toLowerCase(),
|
ext = path.extname(req.files.uploadimage.name).toLowerCase(),
|
||||||
store = storage.get_storage();
|
store = storage.get_storage();
|
||||||
|
|
||||||
if ((type !== 'image/jpeg' && type !== 'image/png' && type !== 'image/gif')
|
if ((type !== 'image/jpeg' && type !== 'image/png' && type !== 'image/gif' && type !== 'image/svg+xml')
|
||||||
|| (ext !== '.jpg' && ext !== '.jpeg' && ext !== '.png' && ext !== '.gif')) {
|
|| (ext !== '.jpg' && ext !== '.jpeg' && ext !== '.png' && ext !== '.gif' && ext !== '.svg' && ext !== '.svgz')) {
|
||||||
return res.send(415, 'Unsupported Media Type');
|
return res.send(415, 'Unsupported Media Type');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue