heapsource/mongoose-attachments — pull request #48 by hiromi2424 (2014-09-12 08:52:19+00:00)
Title: Support convert attachments that has multi pages

When I uploaded a PDF file that contains multiple pages, I noticed following errors occurred.

Error: Command failed: identify: unable to open image `/path/to/tmp/16978-8u61ar-thumb.png': No such file or directory @ error/blob.c/OpenBlob/2644.
identify: unable to open file `/path/to/tmp/16978-8u61ar-thumb.png' @ error/png.c/ReadPNGImage/3851.

I entered tmp directory and saw `16978-8u61ar-thumb-0.png` and `16978-8u61ar-thumb-1.png` files.
Later I found the same situation on:
http://stackoverflow.com/questions/12614801/how-to-execute-imagemagick-to-convert-only-the-first-page-of-the-multipage-pdf-t

This PR contains a solution such above URL shows.