I'm using paperclip to manage uploads, backed onto S3 via Fog. It works well.
I'm trying to take attachments out of emails and save them via paperclip (using the same model etc). Email are parsed by an external service and POSTed to my app, including the attachments. I'm receiving the file itself fine, but I can't work out how to save it using paperclip. The post gives me an object of type ActionDispatch::Http::UploadedFile
.
I took a look at the below, but this involves creating a new File object. I'm not sure this is what I want... How should I do it?
Saving files using Paperclip without upload