List Info

Thread: How do we locate our attachment_fu photos in Windows XP?




How do we locate our attachment_fu photos in Windows XP?
user name
2007-12-31 10:20:51
Simply put: I don't understand the reasoning behind where
photos are
stored in the :file_system option of attachment_fu?

  has_attachment    :content_type => :image,
                    :storage => :file_system,
                    :max_size => 2.megabytes,
                    :resize_to => '320x200>',
                    :thumbnails => { :thumb =>
'100x100' },
                    :processor => 'rmagick'

  validates_as_attachment

  def full_filename(thumbnail = nil)
    file_system_path = (thumbnail ? thumbnail_class :
self).attachment_options[:path_prefix].to_s
    File.join(RAILS_ROOT, file_system_path,
thumbnail_name_for(thumbnail))
  end

For some 'magical' reason this worked fine with my Rails
1.2.6 source
code and now it objects. I am certain that the problem
resides in
WHERE Windows XP tries to save the photo. I know this
because I
changed the :storage value to S3 and the code went through
(although
using Windows XP the image is not viewable using this plugin
do to
some type of operating system anomoly?).
Anyway, how do you guys declare your
"full_filename(thumbnail) path?

The error message I get with Windows XP is:
{"media_id"=>"6",
 "commit"=>"Save Photo",
 "mediaphoto"=>{"title"=>"Tes
t photo",
 "uploaded_data"=>#<File:C:/DOCUME~1/DAVIDK~
1/LOCALS~1/Temp/
CGI4076-5>,
 "geo_long"=>"0.0",
 "show_geo"=>"1",
 "geo_lat"=>"0.0"}}
I seem to recall months ago that there was a problem as
Windows mixes
forward slashes with backward slashes??? I want the uploaded
data to
put itself in the mediaphoto"goes here" folder.
Thank you,
Kathleen
KathysKodegmail.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talkgooglegroups.com
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )