I have a file uploader that is intended to take pdf, rft, txt, doc, docx

I want to create a thumbnail when I can.
txt files and pdf's work great with this

process resize_to_fill: [150, 150], convert: :jpg 


doc and docx's will fail when the runs 

Failed to manipulate with MiniMagick, maybe it is not an image? Original Error: MiniMagick::Invalid


I have two questions about this.
1. How can I handle this error before it becomes an error? Or at least let the user save their attachment, without spitting back at them.
2. Is there a way to convert a doc/docx to a thumbnail (not with calls to ourside services?)


Question: Where can I read more about Leshys?
Answer: Leshys in general can be read about here, in the SRD, or in the Bestiary 3 entry.  The entry does in fact cover the requirements, there just aren't very many.  You also may have missed the overview section, which is at the beginning and not attached to any specific Leshy.  Leshys are nearly free, take a very small amount of time to craft, and have powerful abilities (like sentience) as compared to constructs of roughly the same CR.  Consider carefully the ramifications before integrating Leshys into your world.

The specific Leshy entries are linked in the SRD and follow the general template in Bestiary 3.