diff --git a/src/routes/api.js b/src/routes/api.js index 43194ce8cb..909f142863 100644 --- a/src/routes/api.js +++ b/src/routes/api.js @@ -83,7 +83,7 @@ function uploadImage(image, callback) { } else { if (meta.config.allowFileUploads) { - Posts.uploadPostFile(image, callback); + uploadFile(image, callback); } else { callback(new Error('Uploads are disabled!')); } @@ -109,7 +109,7 @@ function uploadFile(file, callback) { } var filename = 'upload-' + utils.generateUUID() + path.extname(file.name); - require('./file').saveFileToLocal(filename, file.path, function(err, upload) { + require('../file').saveFileToLocal(filename, file.path, function(err, upload) { if(err) { return callback(err); }