attachment-fu

attachment_fu testing in rails 3

坚强是说给别人听的谎言 提交于 2020-01-09 09:50:35
问题 I am trying to write specs for a working file upload functionality using attachment_fu. However, the sample code given by the author for testing requires me to require action_controller/test_process so that I have access to ActionController::UploadedStringIO class. I have used this before in rails 2.x but for rails 3, it fails to locate the test_process file. How do I go ahead with testing the file upload functionality in rails 3? 回答1: I was able to use fixture_file_upload just fine with

Attachment_fu or Paperclip for Rails3

安稳与你 提交于 2019-12-18 13:12:36
问题 I have just upgraded to rails3 and when I installed my usual attachment_fu plugin failed. So I started googling it and although I did manage to find a rails3 version there seemed to be a lot more people talking about paperclip with rails3. So firstly what are the advantages of paperclip? Is there better support for rails3 with it? 回答1: Neither. Use carrierwave . To handle the file uploads, I’ve switched from Paperclip to CarrierWave. While Paperclip has (and continues) to serve me well in

attachment_fu: Don't reload thumbnails

放肆的年华 提交于 2019-12-07 12:10:46
问题 I've got a nice little "photos" class that has attached images. When I go to the page to sort the photos' order, it iterates though each photo, sets the new "sort" value, and saves it. All good so far. Problem is, I've noticed this behavior is fairly slow. Turns out, attachment_fu reloads the thumbnail on every save - regardless of whether or not there's new image data to work with. Obviously this system has been well-thought-out, so I'm only left to assume that a provision exists for this

How to upload images on heroku server using attachment_fu plugin

风流意气都作罢 提交于 2019-12-06 01:43:31
问题 I have an app in Heroku, I need simple file storage for uploaded images for this I used send_data using attachment_fu plugin. After that I have used the tmp/ directory to write this file and want to display on browser, But these files are not displayed in browser. How can I display these images on browser? What is the alternate solution to store and retrieve images? Thanks! 回答1: You cannot store uploaded files on Heroku. You must use an alternative strategy. A couple alternative strategies:

Rails 3 paperclip vs carrierwave vs dragonfly vs attachment_fu [closed]

眉间皱痕 提交于 2019-11-27 03:00:53
I'm working on upgrading a Rails 2.3.11, Ruby 1.9.2 app to Rails 3.0.10, and attachment_fu no longer works. I'm looking at changing to paperclip, carrierwave, or dragonfly for file uploads, or maybe a Rails 3 compatible, maintained version of attachment_fu. Which of these options would be the best to use in terms of performance, how well maintained it is, how easy it is to upgrade from attachment_fu, and maybe is it going to be Rails 3.1 compatible? What are the major strengths and disadvantages of each one? Any insight would be appreciated. I've used both Paperclip and Carrierwave, and if I

Rails 3 paperclip vs carrierwave vs dragonfly vs attachment_fu [closed]

泄露秘密 提交于 2019-11-26 10:21:10
问题 I\'m working on upgrading a Rails 2.3.11, Ruby 1.9.2 app to Rails 3.0.10, and attachment_fu no longer works. I\'m looking at changing to paperclip, carrierwave, or dragonfly for file uploads, or maybe a Rails 3 compatible, maintained version of attachment_fu. Which of these options would be the best to use in terms of performance, how well maintained it is, how easy it is to upgrade from attachment_fu, and maybe is it going to be Rails 3.1 compatible? What are the major strengths and