how to do cropping and storing thumbnails of image while uploading,i am using collection fs with gridfs .plzz help
I suggest to switch to
ulik:ufs. I have made a long survey testing different solutions (see Best solution for uploading images (user avatars)?) and highly recon it.
ulik:ufs thumbnail-generation is included in the examples and really easy to implement. GridFS is implemented very well.
Good luck and have fun!
You have to crop the image before sending it to gridfs. You do that either on the server in a upload cache or on client with a crop library.
Here is an example with dropbox upload and server side crops: https://github.com/janikvonrotz/olmoto/blob/master/lib/collections/files.js
Switch to Cloudinary.com and save yourself hundreds of hours!
Check it out.