Forum: Radiant CMS Adding image uploads to custom extension

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
222784b8a601c9e9786cd0291e58fb7a?d=identicon&s=25 Little Known (littleknown)
on 2009-01-23 17:06
Could anyone provide some direction in adding something like this? I'm
guessing I would have to use the attachment_fu plugin but I'm not sure
how to integrate this with Radiant.
Ec797ac7978ab39f04b0a5844c234528?d=identicon&s=25 Mohit Sindhwani (mohits)
on 2009-01-23 17:12
(Received via mailing list)
Little Known wrote:
> Could anyone provide some direction in adding something like this? I'm
> guessing I would have to use the attachment_fu plugin but I'm not sure
> how to integrate this with Radiant.
>
Would it help to look at the code for Radiant Gallery or
PageAttachments?  Both use attachment_fu

Cheers,
Mohit.
1/24/2009 | 12:11 AM.
8802b1fa1b53e2197beea9454244f847?d=identicon&s=25 Sean Cribbs (seancribbs)
on 2009-01-23 17:17
(Received via mailing list)
Little Known wrote:
> Could anyone provide some direction in adding something like this? I'm
> guessing I would have to use the attachment_fu plugin but I'm not sure
> how to integrate this with Radiant.
>
I recently switched one of my non-Radiant projects from attachment_fu
over to paperclip, and I must say I'm very pleased.  I highly recommend
it.

Sean
222784b8a601c9e9786cd0291e58fb7a?d=identicon&s=25 Little Known (littleknown)
on 2009-01-23 18:35
Sean Cribbs wrote:
> Little Known wrote:
>> Could anyone provide some direction in adding something like this? I'm
>> guessing I would have to use the attachment_fu plugin but I'm not sure
>> how to integrate this with Radiant.
>>
> I recently switched one of my non-Radiant projects from attachment_fu
> over to paperclip, and I must say I'm very pleased.  I highly recommend
> it.
>
> Sean

Well I've tried adding paperclip to my Radiant site but I've hit a snag.

paperclip plugin is in vendor/plugins

### player.rb #####
has_attached_file :photo,
  :styles => {
    :thumb=> "100x100#",
    :small  => "150x150>",
    :medium => "300x300>",
    :large =>   "400x400>" }

### player/app/views/admin/edit.html.erb ###
  <% form_for :player, :html => { :multipart => true } do |f|%>
        <p>
          <%= f.file_field :photo %>
        </p>
  <% end %>

The file field shows up fine, but I get this error when I try uploading
an image:

"Validation errors occurred while processing this form...."

and underneath the browse/upload part it says:
• could not be processed because the file does not exist.

Any ideas, Sean?
222784b8a601c9e9786cd0291e58fb7a?d=identicon&s=25 Little Known (littleknown)
on 2009-01-23 18:56
Little Known wrote:

> ### player.rb #####
> has_attached_file :photo,
>   :styles => {
>     :thumb=> "100x100#",
>     :small  => "150x150>",
>     :medium => "300x300>",
>     :large =>   "400x400>" }

If I change this to just has_attached_file :photo, everything works,
which leads me to believe image processing is not setup correctly on my
machine.

I downloaded the latest ImageMagick binary from their website (dll
version) and ran the installer but it appears that isn't all you need to
do? (Windows, unfortunately)
This topic is locked and can not be replied to.