0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Fix importer bug for IE

closes #3339
- removed check for mime type
This commit is contained in:
Sebastian Gierlinger 2014-07-23 16:53:03 +02:00
parent 17589a1afe
commit 1eff3d9471

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.'));
}