I'm using Amazon s3 to store user uploaded images and I noticed there
was a problem with thumbnails not showing that appears to be more of
problem with attachment fu than with insoshi, but I'll post my
solution here, because part of the complexity is that insoshi uses a
separate thumbnail class to handle the thumbs for photos.

The following fix made my thumbnails show (#base_path is now
thumb_nail class aware):

vendor/plugins/attachement_fu/lib/technoweenie/attachment_fu/backend/
s3_backend.rb


        # The pseudo hierarchy containing the file relative to the
bucket name
        # Example: <tt>:table_name/:id</tt>
        def base_path(thumbnail = nil)
          file_system_path = (thumbnail ? thumbnail_class :
self).attachment_options[:path_prefix].to_s
          File.join(file_system_path, attachment_path_id)
        end

        # The full path to the file relative to the bucket name
        # Example: <tt>:table_name/:id/:filename</tt>
        def full_filename(thumbnail = nil)
          File.join(base_path(thumbnail), thumbnail_name_for
(thumbnail))
        end




--~--~---------~--~----~------------~-------~--~----~
Insoshi developer site: http://dogfood.insoshi.com/
Insoshi documentation: http://docs.insoshi.com/

You received this message because you are subscribed to the Google
Groups "Insoshi" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/insoshi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to