Search the web
Sign In
New User? Sign Up
novarubygroup · The Ruby User Group of Northern Virginia
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Click here for the latest updates on Groups Message search

Messages

  Messages Help
Advanced
Filesystem plus ActiveRecord   Topic List   < Prev Topic  |  Next Topic >
Reply  |  Next Message > 
Re: [novarubygroup] Filesystem plus ActiveRecord

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]
>
>




Fri Nov 20, 2009 7:58 pm

trevrosen
Offline Offline
Send Email Send Email

 |  Next Message > 
Expand Messages Author Sort by Date

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...
Trevor Rosen
trevrosen
Offline Send Email
Nov 20, 2009
2:40 pm

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...
Jonathan Julian
jonathanjulian
Offline Send Email
Nov 20, 2009
7:35 pm

Cool -- thanks for the tip! -TR...
Trevor Rosen
trevrosen
Offline Send Email
Nov 20, 2009
9:58 pm
Advanced

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help