图片上传不起作用亚马逊ec2实例。它在本地机器上工作正常但不适用于amazon ec2实例。
Meteor.startup(function(){
UploadServer.init({
tmpDir: process.env.PWD + '/.uploads/tmp',
uploadDir: process.env.PWD + '/uploads/',
getDirectory: function(file, formData){
return formData.contentType;
},finished: function(file, folder, formFields){
Users.update({email:ServerSession.get('email')},{$set:{image:file.name}});
}
})
});
}