0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-15 03:01:37 -05:00

Merge pull request #3372 from sebgie/issue#3339-2

Fix importer bug on Windows
This commit is contained in:
Hannah Wolfe 2014-07-23 16:53:15 +01:00
commit 4968336b0f

View file

@ -17,8 +17,8 @@ var dataExport = require('../data/export'),
api.settings = require('./settings');
function isValidFile(type, ext) {
if (type === 'application/json' && ext === '.json') {
function isValidFile(ext) {
if (ext === '.json') {
return true;
}
return false;
@ -75,7 +75,7 @@ db = {
ext = path.extname(options.importfile.name).toLowerCase();
filepath = options.importfile.path;
return when(isValidFile(type, ext)).then(function (result) {
return when(isValidFile(ext)).then(function (result) {
if (!result) {
return when.reject(new errors.UnsupportedMediaTypeError('Please select a .json file to import.'));
}