Cool -- thanks for the tip!
-TR
On Nov 20, 2009, at 11:04 AM, Jonathan Julian wrote:
> I think Paperclip will meet your needs well. To strip it down, just don't
> set a post-processor (:style), and define that the files get stored outside
> of the public folder.
>
> has_attached_file :data_file, :url => "/var/:attachment/:id.data"
>
> So the chunk that gets saved to AR id 5 will be found in
>
> /var/data_file/5.data
>
> See Paperclip::has_attached_file docs for more details.
> -Jonathan
>
> On Fri, Nov 20, 2009 at 9:38 AM, Trevor Rosen
> <trevor@...>wrote:
>
> >
> >
> > Hi all,
> > I'm using Rails to build a web service that takes a POST of XML with a
> > chunk of base64-encoded binary data and some metadata. I want to save the
> > decoded binary as a file on the file system and associate it with an
> > ActiveRecord object that includes the metadata.
> >
> > I know Paperclip is great at this kind of thing, but in going through the
> > docs and playing around with it a bit, it seems to have a big emphasis on
> > being used for images, having different versions of the binary file, etc. I
> > don't need any of that, so I was wondering if anyone
> >
> > a) has an alternative all-in-one (a la Paperclip) solution they like for
> > this kind of thing -- but one that is less image-oriented OR
> > b) has any tips on setting up Paperclip for this more stripped-down usage
> >
> > thanks for any info,
> >
> > -TR
> >
> >
>
> [Non-text portions of this message have been removed]
>
>