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:
commit
7cd2976dfa
4 changed files with 3 additions and 4 deletions
Before Width: | Height: | Size: 367 B After Width: | Height: | Size: 367 B |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
@ -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 () {
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue