Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Imagemagick doesnt worcks #36

Open
Oldwo1f opened this issue Dec 8, 2013 · 3 comments
Open

Imagemagick doesnt worcks #36

Oldwo1f opened this issue Dec 8, 2013 · 3 comments

Comments

@Oldwo1f
Copy link

Oldwo1f commented Dec 8, 2013

Hi,

I installed image magic on my win7 and it works.(I can use convert comand line)

But in my thumbnail folder, i still dont have any images uploaded.

Otherwise the midleware works perfectly. Thank you for your work.

My question : Is there any configuration to make image resize work? For now i just added this ine the option.
imageVersions: {
thumbnail: {
width: 80,
height: 80
}
}

@aguidrevitch
Copy link
Owner

can you try to fix imagemagick : node_modules/imagemagick/imagemagick.js
line 178:
exports.identify.path = 'identify';
replace with 'identify.exe' or even full path to identify.exe
and line 255:
exports.convert.path = 'convert';
replace with 'convert.exe' or even full path to convert.exe

@Oldwo1f
Copy link
Author

Oldwo1f commented Dec 9, 2013

It works fine with this two changes.
Thank you very much.
One more question. I have that :

var upload = require('jquery-file-upload-middleware');
upload.configure({
tmpDir : __dirname + '/public/tmp',
uploadDir: __dirname + '/public/imgs',
uploadUrl: '/imgs',
maxPostSize: 11000000000, // 11 GB
minFileSize: 1,
maxFileSize: 10000000000, // 10 GB
acceptFileTypes: /.+/i,
imageTypes: /.(gif|jpe?g|png)$/i,
imageVersions: {
thumbnail: {
width: 80,
height: 80
}
}
});
upload.on('end', function (image) {

imageDal.createNew(image, function (data) {
    console.log('image info in db'); 
});

});

in my app.js.

Is there a way to put all config in another file?

@aguidrevitch
Copy link
Owner

no. But there is wonderful module for this task https://github.com/lorenwest/node-config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants