It's easier to customize carrierwave. Just follow carrierwave instructions
and add this bit to your application.dryml for each uploader class you've
defined.
<def tag="input" for="MyUploader">
<%= file_field_tag param_name_for_this, attributes %></def>
Add the field to contain uploaded filename as string to your model and
mount it.
fields do
...
avatar: string
end
mount_uploader :avatar, MyUploader
On Thursday, June 23, 2011 9:10:15 PM UTC+2, Matt jones wrote:
>
>
> On Jun 23, 2011, at 2:05 PM, ylluminate wrote:
>
> > I'm converting over an old php project in which I simply stored
> > filenames within a db and pointed to a server path for the images.
> >
> > I'm leaning towards a Heroku installation plus my own CDN and was
> > curious which path you may have found for managing image uploads.
> > Presently I see a few recipes involving Paperclip on the recipes, but
> > I just want to perform a sanity check here first. I'm going to have
> > Properties that will have multiple images, but one is the master image
> > and has to be marked as such by the admin. Traditionally I simply
> > used ImageMagick with `mogrify` to process files as they came into the
> > system so that there would be different thumbnail sizes as appropriate
> > and then when a property was deleted, it would also clean out these
> > thumbnails.
> >
> > What would be the cleanest mechanism to handle this given the scenario
> > of needing a master image + diff sized thumbnails while deploying to
> > Heroku and my own CDN (S3 or just an SFTP server)? Using Hobo 1.3RC.
>
> Typically, I'd use Paperclip and a PropertyImage model with a "master"
> boolean and some callback plumbing to make sure that exactly one record
> (for a given Property) has the bit set. Paperclip can do the whole
> post-processing routine (scaling, clipping, etc).
>
> I've heard good stuff about Carrierwave, but I've also heard that it's a
> fairly radical departure from the "old-school" style of handling file
> uploads (vs. Paperclip which is an evolved version of attachment_fu /
> file_column). I've *not* heard of anybody on the list integrating
> Carrierwave with Hobo, so there may be some bumps along the way if you go
> that route.
>
> S3 seems like the standard way of handling these uploads for apps on
> Heroku; if you're already setting up your own "server" to take uploads then
> it doesn't seem to make much sense to be using Heroku...
>
> --Matt Jones
>
>
--
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/hobousers.
For more options, visit https://groups.google.com/groups/opt_out.