0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00

Merge pull request #397 from cobbspur/mime

fixes extensions bug for image uploader
This commit is contained in:
Hannah Wolfe 2013-08-13 13:27:30 -07:00
commit 7cd2976dfa
4 changed files with 3 additions and 4 deletions

View file

Before

Width:  |  Height:  |  Size: 367 B

After

Width:  |  Height:  |  Size: 367 B

View file

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View file

@ -22,9 +22,9 @@
UploadUi = function ($dropzone, settings) {
var source,
$link = $('<a class="js-edit-image image-edit" href="#" >' +
'<img src="/public/assets/img/addImage.png" width="16" height="16" alt="add, edit"></a>'),
'<img src="/public/assets/img/add-image.png" width="16" height="16" alt="add, edit"></a>'),
$back = $('<a class="js-return-image image-edit" href="#" >' +
'<img src="/public/assets/img/returnImage.png" width="16" height="16" alt="add, edit"></a>');
'<img src="/public/assets/img/return-image.png" width="16" height="16" alt="add, edit"></a>');
$.extend(this, {
bindFileUpload: function () {

View file

@ -59,10 +59,9 @@ adminControllers = {
tmp_path = req.files.uploadimage.path,
dir = path.join('content/images', year, month),
target_path = path.join(dir, req.files.uploadimage.name),
ext = path.extname(req.files.uploadimage.name),
ext = path.extname(req.files.uploadimage.name).toLowerCase(),
src = path.join('/', target_path);
function renameFile() {
// adds directories recursively
fs.mkdirs(dir, function (err) {