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

Cannot create thumbnails #34

Closed
lekhnath opened this issue Nov 10, 2013 · 5 comments
Closed

Cannot create thumbnails #34

lekhnath opened this issue Nov 10, 2013 · 5 comments

Comments

@lekhnath
Copy link

This middle ware is working fine but when trying to upload image files the thumbnails are not created and the server is halted. When ever I try to upload image files I get the below message logged in my terminal :

events.js:72
throw er; // Unhandled 'error' event
^
Error: spawn ENOENT
at errnoException (child_process.js:980:11)
at Process.ChildProcess._handle.onexit (child_process.js:771:34)
10 Nov 12:30:41 - [nodemon] app crashed - waiting for file changes before starting...

I have installed 'swig' and 'imagemagick' dependencies also.

@soomtong
Copy link
Contributor

can u check permission for temp directory?
I'm using your combination too. no problem so far.
cheers.

@lekhnath
Copy link
Author

@soomtong I changed the permission for 'tmp' dir to 777 but the same thing is happening. And this is my upload configuration :
// configure upload middleware
upload.configure({
tmpDir : __dirname + '/public/tmp',
uploadDir: __dirname + '/public/uploads',
uploadUrl: '/uploads',
imageVersions: {
thumbnail: {
width: 80,
height: 80
}
}
});

//And the middleware is used as :
app.use('/upload', upload.fileHandler());

The 'thumbnail' directory is automatically created inside upload_directory if there is none. And 'thumbnail' directory has permission set to 777. Is there some settings to stop creating thumbnails ? Because I know here is the problem , but don't know why and how to fix that. Any other suggestions please.

@soomtong
Copy link
Contributor

hmm, your configuration doesn't seen incorrect.
please some logs for me from browse console.

and check installed ImageMagick module with execution.
this module use imagemagick convert execution

http://www.imagemagick.org/

$ convert 

and enable convert tools in your path environment.
you can use it from yum install ImageMagick in CentOS
or apt-get install imagemagick in Debian like Ubuntu

cheers. (sorry poor english. lol)

@lekhnath
Copy link
Author

@soomtong Wow, now it is working like a charm, after installing imagemagick on my Ubuntu ! I was suffering for more than a week. Thank you very very much for your kind help.

I have one confusion and hope it will be clear . If someone have to install the imagemagick in the system then what is the purpose of that imagemagick local-dependency installed in my node/express app.

@johnny12150
Copy link

Still a super useful info.

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

3 participants