public
Fork of technoweenie/attachment_fu
Description: Treat an ActiveRecord model as a file attachment, storing its patch, size, content type, etc.
Homepage: http://weblog.techno-weenie.net
Clone URL: git://github.com/nicksieger/attachment_fu.git
stream data to s3 if possible [ian]

git-svn-id: 
http://svn.techno-weenie.net/projects/plugins/attachment_fu@2983 
567b1171-46fb-0310-a4c9-b4bef9110e78
technoweenie (author)
Thu Aug 30 06:50:26 -0700 2007
commit  30a08b23cdf8e079ad54f2ad3a731976ba8572b0
tree    ed0e4896dfe1564882497081d0956985d8bdb620
parent  79110e972dbd4a92dcffc55bd48185d7263e1965
...
293
294
295
296
 
297
298
299
...
293
294
295
 
296
297
298
299
0
@@ -293,7 +293,7 @@ module Technoweenie # :nodoc:
0
             if save_attachment?
0
               S3Object.store(
0
                 full_filename,
0
- temp_data,
0
+ (temp_path ? File.open(temp_path) : temp_data),
0
                 bucket_name,
0
                 :content_type => content_type,
0
                 :access => attachment_options[:s3_access]

Comments

    No one has commented yet.