I’m poring through the Dragonfly source code right now, trying to get a
handle on how to apply the following technique there:
Client uploads a Zip archive containing N images, PDF files, text files,
etc. When that file arrives at the server, but before it is stored as an
attachment to the current object, the Zip is burst open, contents are
iterated over, and each contained file is saved as a new Dragonfly
attachment. The original Zip is discarded.
I have found an article from 2008 that shows in detail how to do this
with Attachment Fu. But my understanding is that a: attachment_fu isn’t
up to date with Rails 3, let alone 3.1, and b: it uses a discrete AR
model for the saved file, rather than the Dragonfly approach, which
seems more indirect, or at least, doesn’t present a clean target for
extension.
Has anyone looked at this problem, and can anyone share any pointers?
I’d really like to stick with Dragonfly, because it has so many benefits
on the display side of things with on-the-fly resizing and cropping
possible.
I can already see in my mind how I would use Paperclip to do this, that
actually seems quite straightforward by comparison. So if there’s a way
to use Paperclip for the uploads and Dragonfly for the display later,
I’d be curious to hear about that instead.
Thanks in advance,
Walter