fixing image uploads

v1.18.x
Julian Lam 11 years ago
parent b2986f2a4e
commit 67ef155c60

@ -83,7 +83,7 @@ function uploadImage(image, callback) {
} else { } else {
if (meta.config.allowFileUploads) { if (meta.config.allowFileUploads) {
Posts.uploadPostFile(image, callback); uploadFile(image, callback);
} else { } else {
callback(new Error('Uploads are disabled!')); callback(new Error('Uploads are disabled!'));
} }
@ -109,7 +109,7 @@ function uploadFile(file, callback) {
} }
var filename = 'upload-' + utils.generateUUID() + path.extname(file.name); 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) { if(err) {
return callback(err); return callback(err);
} }

Loading…
Cancel
Save