基本上我一直在努力让imagemagick
和/ graphicsmagick
与我的节点应用程序一起正常运行。到目前为止,我遵循了http://www.imagemagick.org/script/install-source.php#unix
我的服务器上的详细信息包括
nodejs
mongodb
mongoose
imagemagick
graphicsmagick
express
似乎安装进展顺利。但是,当我使用gm通过节点运行代码时,我没有收到任何错误,但文件没有写入。我将发布图像后期功能的示例代码。
var gm = require('./gm');
var newRoute = '/some/user/url/';
var files = req.files;
gm(files.file.path).resize(1126).compress('JPEG').quality(quality)
.write(newRoute,function(err){
//do some stuff to save changes on db
});
现在,这在我的本地设备上完美运行。但是在服务器上它不会让步。有没有人对正在发生的事情有任何想法?
应用创建文件夹,文件夹模式应为0777
,但当我使用ssh
登录时,似乎可能是0755', although Im not sure it's all that to do with permissions since I've got mp3 uploads working fine. It's when
imagemagick and
graphicsmagick “进来发挥这种感觉。任何想法?