1

Yo,

I've got attachment_fu set up on my server, and it works just fine. My goal, however, is to be able to upload PDFs and have them convert to image (then use all the pre-built attachment_fu options like resize and thumb produce the desired images). What currently happens is that PDFs upload and remain PDFs, whereas images go through all the motions of resizing and whatnot.

How can I get the functionality I want? Is there a simple way to go about doing this using the tools I already have, or should I just manually invoke RMagick to do the initial conversion? If so, how can I do that and then pass off the file to attachment_fu for handling?

Thanks, --Matchu

Matchu
  • 83,922
  • 18
  • 153
  • 160
  • What version of RMagick are you using? I remember testing PDFs with attachment_fu and it seemed to work just fine with resizing, etc. – Schrockwell May 15 '09 at 02:10
  • RMagick 2.9.1. I just can't seem to figure out the attachment_fu argument logic - if I set content type as just :image, PDFs get rejected. If I allow PDF uploads, then the PDF gets upload and isn't handled as an image... – Matchu May 17 '09 at 17:40

1 Answers1

0

For the oldest unanswered rails question: https://stackoverflow.com/a/69804/156561 his answer is probably very similar to get you in the door to use Attachment_fu which I'm sure you've by now migrated off.

Community
  • 1
  • 1
pjammer
  • 9,489
  • 5
  • 46
  • 56